However happy Iranian leaders might have been at the demise of al-Qaeda leader Osama bin Laden, there was no way they were going to show it.
One reason, of course, that praising the United States for its May 1 raid on Bin Laden’s compound in Pakistan – or anything else for that matter – is anathema to Tehran. But another is that Iranian leaders have steered a cautious path over many years between actively preventing Sunni extremists from undermining the Shia-led state, and avoiding anything that might provoke them into trying.
The response to Bin Laden reflects this cautious course, pursued by Iranian government long before President Mahmoud Ahmadinejad came to power.
In its initial reaction to the US attack, an Iranian foreign ministry spokesman said it was time for American forces to withdraw from the region because "the pretext for fighting terrorism has been removed".
But other reactions cast doubt on the circumstances of Bin Laden’s death. Intelligence minister Heidar Moslehi and President Ahmadinejad have had major differences of opinion in the past, and even here they came out with two divergent versions of events. Moslehi claimed that Bin Laden had been dead for some time, while Ahmadinejad stated that the al-Qaeda leader had been in US custody for a long time but was killed on the day the Americans claimed.
Such questioning of the US narrative is clearly designed to muddy the waters and attract the attention of conspiracy theorists in the Middle East and beyond.
Since the US came into conflict with al-Qaeda in the 1990s, Iran has been caught between a rock and a hard place. On the one hand, it was under intense pressure to cooperate with the US “war on terror”.
On the other, it was naturally reluctant to tempt al-Qaeda into expanding its attacks from neighbouring states to Iran itself. Lengthy, porous borders with Afghanistan and Pakistan were an obvious weak point, potentially as vulnerable to militants slipping through as to drug traffickers. In addition, Iran has a number of Sunni ethnic minorities, in particular the Baluch in the southeast, among whom al-Qaeda might have tried to make inroads and incite resentment of the country’s Shia leadership.
As a political target, Iran was a potential al-Qaeda target both because of its own record of meddling in Sunni states, and because the extremists do not even regard the Shia as Muslims at all.
So on the one hand Tehran would have been glad to see al-Qaeda eliminated once and for all, but at the same time it appeared content to sit and watch as the US became drawn into a long-drawn-out confrontation with the group.
Iran initially welcomed the US-led offensive in Afghanistan in late 2001, and its aims of removing the rule of the Taleban and their al-Qaeda allies. In fact, Iran provided advice and intelligence that made the invasion a lot easier.
But early the following year, President George Bush listed Iran as one of the “axis of evil” states, along with North Korea and Saddam Hussein’s Iraq.
The threat of a US attack on Iran loomed, but Tehran still refused to come out unequivocally against al-Qaeda.
Under pressure from US forces, many al-Qaeda members tried to escape into Iran, offering the authorities there an unexpected form of leverage.
The Iranian foreign ministry said over 2,300 al-Qaeda associates were arrested October 2001 and July 2003, on the Pakistani border alone.
Tehran resisted against pressure from the Bush administration to hand the detainees over. Interviewed by the Saudi newspaper Al-Riyadh, Akbar Hashemi Rafsanjani, a former president and head of the Expediency Council, said "no Muslim individual will be handed over to the US".
But that did not preclude other forms of cooperation in the shape of repatriations of a number of al-Qaeda prisoners to their home countries – Saudi Arabia, Pakistan, Kuwait and Egypt.
Even so, many senior al-Qaeda figures remained in Iranian custody. On several occasions, Arab newspapers released a list of key members detained in Iran. There was always speculation that they included Bin Laden family members, confirmed only last year when one of them applied for asylum at the Saudi embassy in Tehran.
The detained al-Qaeda members gave Tehran a trump card it could use in a number of subtle ways.
In late 2003, for example, there was talk that some of the detainees were to be put on trial. This was followed by security warnings from Iranian officials, so that western embassies in Tehran were placed on high alert. Yet no reports have emerged that the trials ever took place.
In December 2003, the then foreign minister Kamal Kharrazi, announced that an active al-Qaeda cell had been discovered inside Iran, and a number of members arrested following a clash.
Overall, Iran’s policy of not committing itself to a public stance on al-Qaeda has evidently worked. The country has never suffered a major terrorist attack ascribed to the group.
A retired Iranian diplomat summed up Tehran’s view as follows, “Iran does not regard al-Qaeda’s war as its own war, and has therefore made every effort to not get involved in it. But it does enjoy seeing both sides in the conflict grow weary.”
Ebrahim Gilani is the pseudonym of an Iranian journalist and foreign policy analyst based in London.
This article is an abridged and translated version of the full original text published in Farsi, with editorial adjustments agreed with the writer made to provide clarity for English-language readers.