A funny thing happened on Iran's way to regional dominance. Instead of being able to manipulate regional turmoil, Iran now seems to be rudderless, pulled into an internal dispute of its own between the mercurial President Mahmoud Ahmadinejad and Ayatollah Khamenei (the link goes to a Taiwanese animation explaining the dispute in a simple way while at the same time lampooning the parties in this dispute).
It is easy to blame Ahmadinejad as the one starting the current conflict. His insistence on installing his cronies to the cabinet while at the same time trying to get rid of Khamenei's lackey from the very important position of the minister of intelligence triggered Iran's current leadership crisis. Still, this does not explain everything - the problem lies on the structure of the Iranian leadership itself.
So what happened?
Well, for one, there's a leadership succession crisis going on. Similar to China, Iran developed a very distinct way to ensure that it does not have an all-powerful executive that will overthrow the ruling clique and dominate the system: a term limit for the presidency, a Supreme Leader who retains the last word in several key important ministries, and a "Guardian Council" (council of clerics) who vet candidates and laws lest they threatens the ruling elite.
Even though in theory such system creates a stable theocracy, in practice this does not always work, as the president (or any head of government) has the ability to control the bully pulpit and he will gain all the benefits from any popular economic policies. Thus, in the previous flawed election, Ahmadinejad was still able to rely on the support from the rural poor who had benefited from his populist economic policies.
Still, based on the violent reactions of the conservative leadership to the election, it is not too far-fetched to argue that the reformists did win the election. Real winners won't terrorize their opponents, they will simply let the electoral results speak for themselves, as dictators and autocrats have a very interesting habit of showing off how much people love them.
The Green Movement complicated the picture as the movement was comprised of not only the secular protesters, but also reformist clerics, signalling that there was a split within Iranian religious leadership. It was not surprising that the response was vehement on the street. People not only felt robbed of their votes, but they also saw some openings since the clerics were split on this issue. Mousavi was not a lightweight: he used to be Ayatollah Khomeini's premier during Iraq-Iran war and he also backed by Mehdi Karroubi, Mohammad Khatami, and Rafsanjani, three of the most powerful reformist clerics. As a result, people were emboldened, since their revolt would not be able to be construed as an attack on the theocracy - the clerics were important actors in the demonstration!
Not surprisingly, Khamenei threw his support behind Ahmadinejad, even though as early as 2006, there were signs that Khamenei had become wary of Ahmadinejad due to the latter's ambition. It was a marriage of convenience, Ahmadinejad needed to have the conservative elite united to back him in order to prevent further erosion in clerical support, while Khamenei needed Ahmadinejad's backings to solidify his position within the clerical caste by getting rid of the reformists once and for all.
After the Green Movement was decimated and its leaders arrested, both Ahmadinejad and Khamenei then went back to their squabbles. Ahmadinejad is not content with being a two-term president, he wants to keep dominating the Iranian politics while Khamenei wants to limit Ahmadinejad's influence as he fears that the Theocracy can easily be controlled by the office of the president should the president get the opportunity to do so.
The Jasmine Revolution that struck the Middle East gave Iran mixed blessings. On one hand, it allows Iran to expand its influence, since now many of its external enemies are preoccupied with domestic problems. On the other hand, though, it shows something unsettling, that people are not dependent on religious leadership to get rid of their bad secular rulers. In fact, the take home lesson from the Jasmine Revolution is that as long as leaders keep a state's means of violence in their pocket, chances are slim that the government will be overthrown.
Not surprisingly, Ahmadinejad was trying to consolidate his power at the Revolutionary Guard and the Ministry of Intelligence. Iran's Revolutionary Guards are not a united political entity. Theoretically, they reported to the Supreme Leader Khamenei, but in reality through Abadgaran, their political arm, they also have influence in Iranian politics. Ahmadinejad himself is a member of Abadgaran and at the same time a head of Basij, the Guard's militia units, and thus he does have some independent bases of support apart from Khamenei. Even though the Revolutionary Guard's official newspaper launched a criticism on Ahmadinejad not too long ago, such criticism should not be seen as a reflection of the Revolutionary Guard's policy.
On the other hand, Khamenei still commands the loyalty of some people in the Guard and he also can rely on the clerical faction, which stands to lose the most should Ahmadinejad be successful in extending his political influence. Khamenei himself is skilfully using the clerical faction, notably through the important Friday sermons. Still, in the long run, Khamenei's influence will diminish as the clerical group remains divided, Ahmadinejad remains ambitious, and people grow tired of what they see as a country completely dominated by an out-of-touch religious leadership and that undermines the legitimacy of theocracy itself.
Therefore, for Iran's leadership, current squabbles between Ahmadinejad and Khamenei is far more important than the Jasmine Revolution. This squabble may set the fate of the Theocracy itself.