An appellate court on Tuesday upheld the conviction of a former Afghan Taliban member who’s serving a first-of-its-kind life sentence in the Southern California desert.

Khan Mohammed was the first Afghan Taliban member to be tried in a U.S. courtroom, and the first individual convicted under a 2006 federal narco-terrorism law. Now incarcerated at U.S. Penitentiary Victorville, 80 miles east of Los Angeles, Mohammed failed to persuade the U.S. Court of Appeals for the District of Columbia Circuit that his drug dealing couldn’t be linked to a specific act of terrorism.

“Mohammed need not have planned for his drug proceeds to fund terrorist ends,” Judge Thomas B. Griffith wrote. “It is sufficient that the proceeds went to a terrorist – him.”

Even with some national-security secrets blacked out, the appellate court’s 23-page majority opinion sheds light on the dangerous operation in which a U.S. informer and Drug Enforcement Administration agents ensnared Mohammed in Afghanistan. Coming from a court that’s sometimes called the second most powerful in the United States because it oversees many federal agency actions, the decision also could shape future narco-terrorist prosecutions.

While upholding Mohammed’s conviction and life sentence, the appellate court panel gave the 42-year-old native of Afghanistan’s Nangarhar province one final lifeline: Two of the panel’s three judges agreed that Mohammed still may pursue claims that his initial trial attorney was ineffective, in part for failing to aggressively challenge the credibility of the key prosecution witness. Mohammed’s initial trial attorney didn’t call any defense witnesses and offered no evidence on his behalf.

Prosecutors, meanwhile, presented considerable evidence that Mohammed viewed drug dealing as a way to hurt the United States. The trial judge, Colleen Kollar-Kotelly, noted at Mohammed’s 2008 sentencing that “he equates selling heroin destined for American cities with shooting/attacking Americans who have armed forces in Afghanistan,” a trial transcript shows, and secret recordings showed Mohammed bluntly speaking for himself.

“We will eliminate them, whether by opium or by shooting,” Mohammed said to a wired-up U.S. informant while in Afghanistan, according to a tape recording presented at the four-day trial.

Afghanistan produces about 90 percent of the world’s opium, according to the United Nations. Last year, the value of the country’s opium crop leapt to an estimated $1.4 billion.

The case had its beginnings in 2006, when an Afghan named Jaweed, who like many Afghan men has only one name, met a former Taliban official living in Pakistan. The former Taliban official was plotting an attack on Jalalabad airfield in eastern Afghanistan, and he dispatched Jaweed to meet with Mohammed in Afghanistan. Mohammed was a connected man, involved in shady business, according to testimony.

Jaweed told Mohammed he’d get missiles to attack the key air base, but he had a change of heart and began cooperating with Afghan officials, who passed him over to the DEA.

The drug-fighting agency equipped Jaweed with a tape recorder and a tiny video camera and had him tell Mohammed that he knew a man who was in the market for opium. Mohammed eagerly provided the opium and, later, nearly two kilograms – about four pounds – of heroin.

DEA agents then seized Mohammed and packed him off to trial in Washington.

Mohammed’s defense attorney argued that no evidence linked the drug sales to an attempted attack on the air base. The trial judge, though, agreed with prosecutors that Mohammed was planning to use some of his drug profits to buy a car that would transport Taliban. In settling Mohammed’s judicial fate, the court combined those plans with Mohammed’s own tape-recorded statements about his hopes for how the heroin would poison the United States.

“May God turn all the infidels to dead corpses,” Mohammed said, according to one recording.

The appellate court concluded that the narco-terrorism law applied, saying that “it is clear that Congress intended to punish those who support terrorism directly . . . as well as indirectly.”