“The fate of the Americans in Afghanistan will be worse than that of the Russians,” Mohammed Ismail Khan warned in 2009. The same Afghan is now vowing to drive all “foreigners” out of Afghanistan.

More bluster from a Taliban leader? Hardly. Khan serves as Afghanistan’s energy minister, and is a key member of American ally Hamid Karzai’s cabinet.

In a videotaped meeting last month with jihadists in Herat Province, Khan slammed the US for bringing “American girls, white-skinned Western soldiers and black-skinned American soldiers” into Afghanistan. He called on the “mujahideen” to take up arms and attack them like they did the Soviet “invaders” in the 1980s.

Though his threatening remarks were quickly dismissed by the Afghan government, they should not be taken lightly — especially with American soldiers increasingly vulnerable to insider attacks by Afghans.

Khan has lethal experience launching such attacks. In March 1979, Khan, then a captain in the Afghan army, orchestrated the murder of 50 Soviet military advisers and 300 of their family members in Herat Province. He decapitated many of them and had their heads paraded on spikes through the city.

The atrocity marked the opening salvo of the rebellion which led to the Soviet invasion of Afghanistan in December 1979.

The US Army recently cited Khan’s treachery as an example of “green-on-blue attacks” that “were common and costly to the Soviet army” during its occupation of Afghanistan. It warned that Khan is “now the Afghan government’s minister of energy.”

The Army published the account in February 2012 and distributed it to soldiers serving in Afghanistan as part of an “Official Use Only” handbook, titled, “Inside the Wire Threats — Afghanistan.” The 35-page handbook also notes that Soviet attempts to train and stand up an Afghan army to fight insurgents failed miserably. “The Afghan army was an unreliable ally,” it said. “It faced constant defections from the start, as not only individuals and units but also whole divisions went over to the mujahideen, taking their personal kit and rifles as well as tanks and armored vehicles.”

Added the report: “The original Soviet plan to push the Afghan army into the field to combat the mujahideen fell by the wayside. The Afghan army’s limited numbers, lack of training, and questionable loyalties made this project too risky to implement.”

A 2011 Army survey found that “on average, US soldiers perceived that 50% of (the) ANA (Afghan National Army) were Islamic radicals” vulnerable to Taliban recruitment. The results were reported in an unclassified study titled, “A Crisis of Trust and Cultural Incompatibility.” It quotes one American soldier as saying, “A reporter attached to my platoon said that during a conversation with ANA soliders, they said that if the Taliban began to win the war, they would switch sides and join the Taliban.”

The crux of the Obama administration’s exit strategy has been training Afghan security forces to fight the Taliban and al Qaeda. Much of that training has been suspended due to rogue attacks and defections not unlike what the Soviets faced.

Afghan government troops and police — our allies — have turned their guns on US-led coalition troops at least 47 times this year, killing at least 63, most of them Americans. That’s more than double 2011’s total of 21 attacks, in which 35 were killed.

One recent attack involved for the first time an Afghan policewoman, who early last week drew her US-issued pistol and fatally shot a US military adviser in the chest at the police headquarters in Kabul. The police sergeant, a mother of four with a clean record, had earlier been a refugee in Iran.

Until 2005, Khan was governor of Herat Province, which borders Iran. He controlled border crossings and trade there. He also influenced local recruitment for Afghan security forces. Kabul recently accused Khan of illegally distributing weapons to his jihadi supporters in Herat. Although Khan says he would fight the Taliban if it returned to power, his own son-in-law recently joined the Taliban insurgency.

The US military seems to be in denial about the breadth and scope of theinternal threats it faces in Afghanistan. While on the one hand it warns that the “major problem confronting the Soviets was the unreliability of the Afghan army,” it nonetheless appears Polyannish about its own prospects for partnering with the Afghan army. “U.S. forces can gain keen insights and lessons from the Soviet 10-year occupation of Afghanistan,” the Army handbook asserts. The same document goes on to claim that “in contrast” to the Soviet experience, “the United States and CF (coalition forces) have achieved great success in training and partnering with our ANSF (Afghan National Security Forces) counterparts.”

Paul Sperry is a Hoover Institution media fellow and author of “Infiltration.”