Only in the most immediate sense does the dispute, which has seen Tehran mass 200,000 troops along its eastern border, stem from the murder of nine Iranian diplomats by Taliban militiamen when they captured the northern Afghan city of Mazar-e-Sharif last month.
The outrage at the killings was understandable enough. But the very presence of the diplomats in a town previously held by Shia rebel factions reflects the religious divide between the Taliban who are Sunni Muslims, and overwhelmingly Shia Iran. Long before the murder of the diplomats, Iran was providing bases for Taliban opponents. Its hostility now will only be fuelled by reports of large-scale massacres of Shias after the fall of Mazar-e-Sharif.
However, nearly all Islamic countries in the region are Sunni and do not share this instinctive enmity. Pakistan has long been a source of support for the Taliban. Less obviously, Saudi Arabia has extended financial and logistic support to the radical movement. Both are Sunni, and both are among the three countries that have officially recognised the Taliban regime. The other is the United Arab Emirates.
The West, too, seems to have quietly decided that the Taliban, however unpalatable some of its methods, is the horse to back. That might not seem so after America's 20 August attack on the Afghan base of the alleged terrorist Osama bin Laden. But the US has been careful to distinguish between the Taliban and Bin Laden.
After two decades of war and civil war since the Soviet invasion of 1979, the fundamentalist militia seems to offer the best chance of pacifying and stabilising a shattered country. And a more stable country is a more suitable place to build a pipeline. So, finally, to oil, or, more exactly, the colossal energy riches of former Soviet central Asia to the north. The prize for which the two regimes are vying is not only regional leadership. It is also the path to be followed by any pipeline carrying oil and gas from Turkmenistan and Kazakhstan to the deep-water ports in the south.
For the international oil industry, the simplest route would be via Iran, crossing just one border on its way to Bandar Abbas on the Straits of Hormuz. Unfortunately, Iran is still subject to US sanctions.
Hence the Afghan alternative. The Houston-based Unocal company and Saudi- owned Delta Oil are ready to go with a 900-mile gas pipeline through Afghanistan to a Pakistani port. Both Afghanistan and Pakistan stand to reap massive economic benefits, which is another reason for their de facto alliance. Their gain would be Iran's loss. Hence the suspicion that Tehran is keeping the fighting going to prevent the pipeline.
So, in the politics of oil as well, Tehran is also largely isolated from its neighbours, with the partial exception of Russia. Whether Iran likes it or not, the Taliban - which controls over 90 per cent of Afghanistan - will surely soon be recognised by the international community.
For all the belligerent talk from Tehran - and yesterday's closure of the moderate Tous newspaper, which had advocated a negotiated solution to the crisis - a full-scale invasion is unlikely. Memories of the carnage of the eight-year war with Iraq are still fresh, as is the failure of the Soviet Union to tame Afghanistan during the same period. If Iran uses force to avenge the diplomats, air strikes will probably be the chosen method.Reuse content