TEHRAN A power struggle between Iran's top leaders could shake the Islamic Republic to its foundations, with no sign that its hardline president can regain the trust of conservative politicians and clerics, analysts say.
The unprecedented public intervention of Ayatollah Ali Khamenei in reversing President Mahmoud Ahmadinejad's decision to dismiss the intelligence minister last month has put Iran's Supreme Leader in the forefront of a power struggle that could harm the legitimacy of the Iranian government.
Khamenei's status as lofty arbiter had already eroded when he quickly endorsed Ahmadinejad's disputed 2009 re-election.
Now, he has shown no willingness to back off even after Ahmadinejad stayed at home for 10 days, boycotting cabinet meetings, in an apparent protest over the minister's reinstatement. The president returned to work last Sunday.
The dispute has heightened the anger felt by conservatives over efforts by Ahmadinejad to wrest more control over security and foreign affairs from the clerical establishment. Now conservatives may take off the gloves, analysts say.
Many Shi'ite clerics and politicians have warned Ahmadinejad over his bucking of Khamenei's authority. Chants of "death to opponents of the Supreme Leader" have been heard at Friday prayers and sermons.
Even Ahmadinejad's own religious mentor, Ayatollah Mohammad Taqi Mesbah-Yazdi, cautioned that disobedience toward the Supreme Leader was tantamount to "apostasy from God."
The president's official website (president.ir) has dismissed reports of a deadline given to Ahmadinejad to publicly accept the reinstatement of Heydar Moslehi or resign.
Under Iranian law, the president has the right to dismiss ministers. But Khamenei is Iran's ultimate wielder of power.
And conservative parliamentarians have warned Ahmadinejad he could face impeachment if he refused to obey Khamenei. The votes of at least one third of parliament's 290 lawmakers are required for impeachment of the president.
Some MPs argued that Ahmadinejad's allies wanted to control the intelligence ministry to secure a majority in the 2012 parliamentary elections, since the intelligence ministry is in charge of checking backgrounds of potential candidates.
The Islamic Republic's first president was impeached in 1981 for attempting to undermine the authority of Ayatollah Ruhollah Khomeini, revered leader of Iran's Islamic revolution.
ARAB PRO-DEMOCRACY REVOLTS CAST SHADOW
Analysts say the outcome of Iran's power struggle is uncertain but that it could have been kindled in part by concerns over any spillover effect of popular uprisings against dictatorial leaders in the Arab world.
"Khamenei feels compelled to confront Ahmadinejad to preserve his own authority and the system," said analyst Hamid Farahvashi. "Khamenei might want to use Ahmadinejad as a scapegoat if the regional popular crisis spreads into Iran."
Iran's leaders maintain that the Arab world revolts have been inspired by its 1979 Islamic Revolution, although analysts abroad say the unrest has been generally secular, not religious.
In any case, Iranian leaders are worried about any revival of anti-government protests that buffeted the country after the re-election of Ahmadinejad. The opposition says the vote was rigged. State authorities deny this.
Iran's elite Revolutionary Guards, who quelled anti-government outpourings in the streets after the 2009 vote, have also distanced themselves from Ahmadinejad.
"The Islamic Republic cannot survive without the existence of the Supreme Leader," the Sharq newspaper quoted Guards commander-in-chief Mohammad Ali Jafari as saying.
There is no clear political constellation aligned against Ahmadinejad yet but it might yet crystallise, analysts say, if conservatives decide that Ahmadinejad's actions threaten the stability of the Islamic Republic.
"Khamenei is Iran's most powerful spiritual, political and military leader ... Without his backing Ahmadinejad will become a very weak president even if he stays in office," said analyst Mohsen Sedaghati.
Conservatives say Ahmadinejad is surrounded by "deviants" in his inner circle, including his controversial chief of staff, Esfandiar Rahim-Mashaie, who is accused of undermining the central role of Shi'ite clerics in Iranian politics by touting the nationalist strain of Iranian history and culture.
Many clerics and conservative politicians accused Mashaie and his allies recently of using supernatural powers in pursuing government policies. At least 25 allies of Ahmadinejad and Mashaie have been arrested and several websites affiliated to them have been blocked in the past days.
Some Iranian media reports said Ahmadinejad backed a Mashaie candidacy to succeed him in the 2013 presidential vote.
Abbas Amirifar, the head of prayers at the presidential palace, was also arrested over his alleged role in making a film called "Reappearance Is Imminent."
The film depicts Khamenei and Ahmadinejad as two close companions of the hidden Imam Mahdi, who devout Shi'ite Muslims believe will reappear some day to spread justice in the world.
(Editing by Mark Heinrich)