KABUL, AFGHANISTAN – For more than a decade, wads of U.S. dollars packed into suitcases, backpacks and, on occasion, plastic shopping bags have been dropped off every month or so at the offices of Afghanistan's president — courtesy of the Central Intelligence Agency.

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.

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 grip 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 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.