As the Obama administration and Congress begin tying U.S. aid to anti-corruption efforts in Afghanistan, it turns out the man at the center of a corruption investigation in Kabul has been on the CIA payroll for years, several high-level officials confirmed to Fox News on Thursday.

Mohammed Zia Salehi, the chief of administration of President Hamid Karzai's National Security Council, who was arrested on corruption charges last month and then released at the behest of Karzai, is indeed paid by the United States, though for what remains unclear.

It also is true, according to several Afghanistan-based sources, that Karzai's brother Ahmed Wali Karzai, currently the governor of Kandahar province, is also paid by the CIA. 

Sen. John Kerry, D-Mass., made an emergency trip to Kabul last week to impress upon Karzai the need to not intervene in corruption proceedings against officials such as Salehi, as the United States tries to impress upon the government the need to win hearts and minds by not adding to the country's problems. 

The CIA has had deep ties and assets amongst Afghan's warring factions that date back to the early 1990s. Prior to his current position, Salehi had been an aide to Karzai ally Abdul Rashid Dostum, who was also a key U.S. ally when the Northern Alliance toppled the Taliban in 2001. 

The revelation about Salehi's connections, first reported in The New York Times, comes at a particularly sensitive time. Salehi was arrested by a U.S. and British-backed anti-corruption task force and was released hours later, after Karzai intervened.

A U.S. official familiar with the situation insisted that Karzai didn't free Salehi because of "any supposed connection to the U.S." The official added that no American tried to get him released.

"Our message to Karzai has been consistent: Don't do anything that might give the impression you're soft on corruption." the official said.

The official also noted that there's "no indication of any connection whatsoever between the United States government and the activities for which this individual is being investigated."

The official said people sometimes get paid for information the U.S. needs for its security and that often that means dealing with someone who "might down the road -- and certainly not at our behest -- put his hand in the till."

"We neither foster corruption nor pretend it doesn't exist," the official said. 

Salehi was arrested by the Afghan police after allegedly being wiretapped soliciting a car for his son in exchange for his hindering a U.S.-supported probe of a company suspected of shipping billions of dollars out of the country for Afghan officials, drug smugglers and insurgents.

The New York Times reported that the Obama administration is faced with the dilemma of making anti-corruption efforts a centerpiece of U.S. strategy or overlooking it so as not to destabilize the Karzai government. 

“Fighting corruption is the very definition of mission creep,” one Obama administration official told the newspaper.

Speaking to Fox News on Wednesday, Gen. David Petraeus, the top U.S. commander in Ira, said he doesn't think Karzai is undermining U.S. anti-corruption efforts. 

"Certainly there are cases in which there are either local or provincial or national officials who have exerted undue influence. There's no question about that. But I don't think that anyone has alleged that President Karzai, for example, has been engaged in corrupt behavior or that he is anything but actually very forthright and very publicly saying that there is a corruption problem," Petraeus said.

Petraeus added that if Karzai's government lacks legitimacy among the citizens of Afghanistan, " that's a huge setback for our counterinsurgency campaign."

The U.S. official who spoke to Fox News said trying to get good government in Afghanistan is pointless unless security is achieved. 

"The first is a precondition for everything else, and if you try in Afghanistan to focus now on building a pure, perfect state, you'll destroy everything that's been achieved so far.  Some people in our government -- perhaps with a copy of Plato's Republic under their arms -- don't seem to understand that," the official said. 

Fox News' Jennifer Griffin and Mike Emanuel contributed to this report.