As the Afghan war proceeds in an uncertain path, Iran, Afghanistan’s western neighbor, seems to have been reaping all the benefits.  Each of the US’s policy setbacks provide a great gift to the Iranian clerical rulers by helping them enhance their clout in the region and expand their international maneuvering space against the West.

To begin with, Iran’s recent strategic gains derive heavily from the fall and rise of two military and political entities in Afghanistan, the Taliban and the Northern Alliance, the latter of which has now changed its name to the United Front.

In the late 1990s, the Northern Alliance still held sway over a small contiguous territory in the north of the country, and was later hired by the US Special Forces to oust the Taliban from power in late 2001, which was accomplished with stunning speed. The post-Taliban era produced a huge power vacuum in Afghanistan that was filled with Iran’s long-time protégé.

This was a strategic flaw in the US-led Western invasion of Afghanistan that caused short term pleasure, but long term pain.  The Northern Alliance government in Kabul vociferously crossed the ethnic threshold by alienating the country’s dominant Pashtuns, who have traditionally ruled Afghanistan for many centuries.  Such an imbalanced power-structure in Afghanistan and a Pashtun political and economic disenfranchisement offered fertile ground for the revival of the Taliban.

Iranian mullahs once again found their Afghan constituency back in power in Kabul, ironically with the help of their greatest adversary.  By using the powerful warlords of the Northern Alliance, Iran remains a major political architect in making a minefield in Afghanistan against Western strategic interests.

President Hamid Karzai’s erratic flirtation with the Iranian ruling elite is hardly surprising. “In my view, protesting against a country that is friendly and fraternal is wrong,” he said in response to widespread protests in Afghanistan over public executions of Afghans in Iran.  Karzai tries to find a foothold for the warlords of the Northern Alliance in the future of Afghanistan.

With the rise of the Taliban insurgency, the warlords and Karzai’s own corrupt family members seem to have been in a state of existential fear for survival. This anxiety reached its climax when the Obama administration set July 2011 as the date for the beginning of the United States’ troop withdrawal in Afghanistan.

The Northern Alliance is the staunch supporter of Karzai and his family members, for they, on one hand, give the government in Kabul a Pashtun color and, on the other, sustain their close relationship with Iran.  Following the fall of the communist regime in Kabul, the Northern Alliance was formed in 1992. With the help of Russia and India, Iran turned the alliance into a defensive bulwark against the influence of the US and Saudi Arabia.

But the rise of the Taliban in Afghanistan was an Iranian disaster, for they soon established a powerful base for supporting Sunni minority rights in Iran. The situation changed quickly.  The 9/11 event was heaven-sent for the Iranian Mullahs. Without firing a shot, the Iranian Mullahs got rid of the Taliban. This explains why high ranking members of Iran’s Revolutionary Guards helped the fall of the Taliban government in Kabul in 2001 by fighting alongside and advising the Northern Alliance in the month after the September 11 terrorist attacks.

At the same time, the U.S. charges that Iran doesn’t want to see a Western success in Afghanistan.  Much like Pakistan, Iran also provides tactical assistance to the Taliban to hurt the US and its allies, according to Washington.  Just last week, the top US commander in Afghanistan General Stanley McChrystal said in Kabul, “there is clear evidence of Iranian activity-in some cases providing weaponry and training to the Taliban.”

Iran has built a complex web of ideological spheres of influence in Afghanistan within the Afghan Dari/Farsi speaking and Shia minorities that occupy all power ministries in the Karzai government from behind the scenes, although it has never established a Hezbollah-like terrorist militant group in Afghanistan.

Since the Islamic Revolution in 1979, Iran’s clerical rulers have spent a substantial amount of petro-dollars on foreign policy, transplanting Shia militancy in Afghanistan.  Iran actively supports the Afghan ethnic Hazara tribe in central Afghanistan, financially and militarily. Recent clashes between Hazara and Pashtun nomads in central Afghanistan were intensified by Iranian interference in the country.  The Iranian ruling elite see Pashtuns as Iran’s historical regional rivals, and its efforts are directed at preventing them from reinstating their traditional military and political status in Afghanistan and across the region.

Thus, the US-led invasion of Afghanistan enabled Iran to get rid of its casus belli.  Iranian mullahs seem to be in a euphoric mood now.  They sense the good old days of the expanding eighteenth-century Safavid Shia Empire that ushered in Iran and its neighborhood two-centuries of violent and centralized religion-based terrorism by forcefully converting other sects of Islam to Shiism.  Like present day Iranian rulers, the Safavid kings held Islamic leaders to be the divinely ordained heads of state and religion. This pattern persists today even more strongly.  In a false messianic gesture, the Iranian President Mahmoud Ahmadinejad has recently boasted that if the prophets were alive today they would choose to live under a regime like present-day Iran’s. The Safavid Empire was toppled at its birthplace—Isfahan— by mutinous Afghan tribes in 1772.

Any further Pashtun military and political weakness in Afghanistan will make the Iranian clerical ruling class stronger.  Increased Western involvement in Afghanistan, plus the lack of a holistic Western approach towards the Afghan war, would provide Iranian dictators with a distraction to shift the world’s attention from the charges that it is seeking nuclear weapons and encouraging terrorism against the West in Afghanistan and the Middle East. If, God forbid, Iran ever did join the nuclear club, its repressive theocracy would perpetuate its survival. The revival of the Pashtun tribal culture imbued with a moderate Sunni Islam could, on the other hand, re-order the geopolitical balance in the region.  It could also effectively roll back Iranian potential support for extremist groups and contain its hegemonic ambitions.