All told, tens of millions of dollars have flowed from the CIA to the office of President Hamid Karzai, according to current and former advisers to the Afghan leader.
"We called it 'ghost money,"' said Khalil Roman, who served as Karzai's chief of staff from 2002 until 2005. "It came in secret, and it left in secret."
The CIA, which declined to comment for this article, has long been known to support some relatives and close aides of Karzai. But the new accounts of off-the-books cash delivered directly to his office show payments on a vaster scale, and with a far greater impact on everyday governing.
Moreover, there is little evidence that the payments bought the influence the CIA sought. Instead, some U.S. officials said, the cash has fueled corruption and empowered warlords, undermining Washington's exit strategy from Afghanistan.
"The biggest source of corruption in Afghanistan," one U.S. official said, "was the United States."
The United States was not alone in delivering cash to the president. Karzai acknowledged a few years ago that Iran regularly gave bags of cash to one of his top aides.
At the time, in 2010, U.S. officials jumped on the payments as evidence of an aggressive Iranian campaign to buy influence and poison Afghanistan's relations with the United States. What they did not say was that the CIA was also plying the presidential palace with cash - and unlike the Iranians, it still is.
U.S. and Afghan officials familiar with the payments said the agency's main goal in providing the cash has been to maintain access to Karzai and his inner circle and to guarantee the agency's influence at the presidential palace, which wields tremendous power in Afghanistan's highly centralized government. The officials spoke about the money only on the condition of anonymity.
It is not clear that the United States is getting what it pays for. Karzai's willingness to defy the United States - and the Iranians, for that matter - on an array of issues seems to have only grown as the cash has piled up. Instead of securing his good graces, the payments may well illustrate the opposite: Karzai is seemingly unable to be bought.
Over Iran's objections, he signed a strategic partnership deal with the United States last year, directly leading the Iranians to halt their payments, two senior Afghan officials said. Now, Karzai is seeking control over the Afghan militias raised by the CIA to target operatives of al-Qaida and insurgent commanders, potentially upending a critical part of the Obama administration's plans for fighting militants as conventional military forces pull back this year.
But the CIA has continued to pay, believing it needs Karzai's ear to run its clandestine war against al-Qaida and its allies, according to U.S. and Afghan officials.
Like the Iranian cash, much of the CIA's money goes to paying off warlords and politicians, many of whom have ties to the drug trade and, in some cases, the Taliban. The result, U.S. and Afghan officials said, is that the agency has greased the wheels of the same patronage networks that U.S. diplomats and law enforcement agents have struggled unsuccessfully to dismantle, leaving the government in the grips of what are basically organized crime syndicates.
The cash does not appear to be subject to the oversight and restrictions placed on official U.S. aid to the country or even the CIA's formal assistance programs, like financing Afghan intelligence agencies. And while there is no evidence that Karzai has personally taken any of the money - Afghan officials say the cash is handled by his National Security Council - the payments do in some cases work directly at odds with the aims of other parts of the U.S. government in Afghanistan, even if they do not appear to violate U.S. law.
Handing out cash has been standard procedure for the CIA in Afghanistan since the start of the war. During the 2001 invasion, agency cash bought the services of numerous warlords, including Muhammad Qasim Fahim, the current first vice president.
"We paid them to overthrow the Taliban," the U.S. official said.
The CIA then kept paying the Afghans to keep fighting. For instance, Karzai's half brother, Ahmed Wali Karzai, was paid by the CIA to run the Kandahar Strike Force, a militia used by the agency to combat militants, until his assassination in 2011.
A number of senior officials on the Afghan National Security Council are also individually on the agency's payroll, Afghan officials said.
While intelligence agencies often pay foreign officials to provide information, dropping off bags of cash at a foreign leader's office to curry favor is a more unusual arrangement.
Afghan officials said the practice grew out of the unique circumstances in Afghanistan, where the United States built the government that Karzai runs. To accomplish that task, it had to bring to heel many of the warlords the CIA had paid during and after the 2001 invasion.
By late 2002, Karzai and his aides were pressing for the payments to be routed through the president's office, allowing him to buy the warlords' loyalty, a former adviser to Karzai said.
Then, in December 2002, Iranians showed up at the palace in a sport utility vehicle packed with cash, the former adviser said.
The CIA began dropping off cash at the palace the following month, and the sums grew from there, Afghan officials said.
Payments ordinarily range from hundreds of thousands to millions of dollars, the officials said, though none could provide exact figures. The money is used to cover a slew of off-the-books expenses, like paying off lawmakers or underwriting delicate diplomatic trips or informal negotiations.
Much of it also still goes to keeping old warlords in line. One is Abdul Rashid Dostum, an ethnic Uzbek whose militia served as a CIA proxy force in 2001. He receives nearly $100,000 a month from the palace, two Afghan officials said. Other officials said the amount was significantly lower.
Dostum, who declined requests for comment, had previously said he was given $80,000 a month to serve as Karzai's emissary in northern Afghanistan. "I asked for a year upfront in cash so that I could build my dream house," he was quoted as saying in a 2009 interview with Time magazine.
Some of the cash also probably ends up in the pockets of the Karzai aides who handle it, Afghan and Western officials said, though they would not identify any by name.
That is not a significant concern for the CIA, said U.S. officials familiar with the agency's operations. "They'll work with criminals if they think they have to," one American former official said.
Interestingly, the cash from Tehran appears to have been handled with greater transparency than the dollars from the CIA, Afghan officials said. The Iranian payments were routed through Karzai's chief of staff. Some of the money was deposited in an account in the president's name at a state-run bank, and some was kept at the palace. The sum delivered would then be announced at the next Cabinet meeting. The Iranians gave $3 million to well over $10 million a year, they said.
When word of the Iranian cash leaked out in October 2010, Karzai told reporters that he was grateful for it. He then added: "The United States is doing the same thing. They are providing cash to some of our offices."
At the time, Karzai's aides said he was referring to the billions in formal aid the United States gives. But the former adviser said in a recent interview that the president was in fact referring to the CIA's bags of cash.
No one mentions the agency's money at Cabinet meetings. It is handled by a small clique at the National Security Council, including its administrative chief, Mohammed Zia Salehi, Afghan officials said.
Salehi, though, is better known for being arrested in 2010 in connection with a sprawling, American-led investigation that tied together Afghan cash smuggling, Taliban finances and the opium trade. Karzai had him released within hours, and the CIA then helped persuade the Obama administration to back off its anti-corruption push, U.S. officials said.
After his release, Salehi jokingly came up with a motto that succinctly summed up the United States' conflicting priorities. He was, he began telling colleagues, "an enemy of the FBI, and a hero to the CIA."
(Mark Mazzetti contributed reporting from Washington)