WASHINGTON  When Hajji Juma Khan was arrested and transported to New York to face charges under a new American narco-terrorism law in 2008, federal prosecutors described him as perhaps the biggest and most dangerous drug lord in Afghanistan, a shadowy figure who had helped keep the Taliban in business with a steady stream of money and weapons.

But what the government did not say was that Mr. Juma Khan was also a longtime American informer, who provided information about the Taliban, Afghan corruption and other drug traffickers. Central Intelligence Agency officers and Drug Enforcement Administration agents relied on him as a valued source for years, even as he was building one of Afghanistan’s biggest drug operations after the United States-led invasion of the country, according to current and former American officials. Along the way, he was also paid a large amount of cash by the United States.

At the height of his power, Mr. Juma Khan was secretly flown to Washington for a series of clandestine meetings with C.I.A. and D.E.A. officials in 2006. Even then, the United States was receiving reports that he was on his way to becoming Afghanistan’s most important narcotics trafficker by taking over the drug operations of his rivals and paying off Taliban leaders and corrupt politicians in President Hamid Karzai’s government.

In a series of videotaped meetings in Washington hotels, Mr. Juma Khan offered tantalizing leads to the C.I.A. and D.E.A., in return for what he hoped would be protected status as an American asset, according to American officials. And then, before he left the United States, he took a side trip to New York to see the sights and do some shopping, according to two people briefed on the case.