While the crisis over Iran's nuclear programme dominates the headlines, the stage is set for an even bigger internal crisis that could affect the country's behaviour for some time to come.

The burgeoning crisis is, in fact, the latest episode in a bitter struggle that started more than four years ago when new elite of younger, mostly non-clerical, revolutionaries made its bid for power against older elite of ruling mullahs and their business associates.

The new emerging elite succeeded by first winning control of a majority of municipal councils. It then used that as a base for winning the Islamic Consultative Assembly, the regime's unicameral parliament. Their next move came exactly a year ago when, using control of the local councils and the parliament, Mahmoud Ahmadinejad, the candidate of the new elite, defeated Hashemi Rafsanjani, the standard-bearer of the old guard in the presidential election.

Many in Iran have seen the new elite's relentless bid for power as a "creeping coup d'etat". If that is the case, the creeping is not over yet. The new elite have two other citadels of power to conquer before firmly claiming control in the name of the "Hidden Imam".

The first is the Assembly of Experts, a body of 90 men whose task is to elect and, when necessary, dismiss the "Supreme Guide". Right now, the old elite controls the assembly, with Ayatollah Ali Akbar Meshkini as speaker and Rafsanjani, the defeated presidential candidate, as one of his deputies.

The new elite appear determined to capture the assembly when it comes up for re-election in November. Their candidate for speaker is Ayatollah Ahmad Janati, a radical mullah with close ties to Ahmadinejad.

Capture the position

If the new elite win the assembly, they will almost certainly try to capture the position of "Supreme Guide", held by Ayatollah Ali Khamenei since Ayatollah Ruhollah Khomeini's death in 1989.

Even if the new elite capture the Assembly of Experts, however, getting rid of the "Supreme Guide" might not prove as easy as they might presume.

The new elite's candidate for "Supreme Guide" is Ayatollah Mohammad-Taqi Mesbah-Yazdi, a dour-faced theologian in Qom known for his radical interpretation of the doctrine of the "Hidden Imam". However, what makes a possible election of Mesbah-Yazdi as "supreme guide" especially significant is his belief that the mullahs should not directly intervene in government. That is in contrast with the views of both Khomeini and Khamenei, who reject the slightest demarcation between religion and politics.

While much of this power struggle is fuelled by personal rivalries and mundane political differences, its theological topos consists of a doctrinal dispute that has marked duodecimo (Twelver) Shi'ism for over 1,000 years. The duodecimo Shi'ites believe that Allah created the world for the family of Prophet Mohammad (PBUH) and bestowed all power on 12 descendants of his favourite daughter Fatima. The last of the 12, Mohammad Bin Hassan, known as the Mahdi (the guide), disappeared in 940 AD, ushering in a period of ghaybat al-kubra (long absence) during which no government anywhere in the world has legitimacy. The return of the Hidden Imam, the Mahdi, will mark the end of the world as we know it and the start of a new and perfect one.

The theological division among Shi'ites concerns a simple question: what should believers do while the Imam is absent?

One doctrine, known as Intizar (waiting) maintains that the best that believers can do is to be patient and wait until the Imam decides to return.

That doctrine is opposed by another known as Ta'ajil (to hasten). The Ta'ajilis insist that believers should seek to unite the entire Islamic ummah and lead it into battle against the "Infidel" with the view of provoking a final showdown for global domination in the hope that, when the crunch comes, the Hidden Imam, will return to ensure the victory of the Only Truth.

Ahmadinejad claims that the aim of his government's actions is to hasten the coming of the Mahdi. The "Hasteners" have put together a powerful coalition backed by large segments of the military and security services.

Against that background the current showdown between the Islamic Republic and the United Nations over the nuclear issue assumes special significance. If the major powers are perceived to be backing down, the "Hasteners" would be able to claim victory and use it as a springboard for winning the Assembly of Experts and, later, evicting Khamenei.

If, on the other hand, Ahmadinejad is forced to eat his words and agree to stop uranium enrichment, the Patient Awaiters could expose him as a bluffer pushing the nation towards war.

The major powers' choice may be between Charybdis and Scylla, which means no real choice, but that has been the case in Iran since the mullahs swept to power in 1979.

Amir Taheri, former executive editor of the most important Iranian newspaper, Kayhan, is a member of Benador Associates.