Iranians are struggling over the legacy and even the legitimacy of an Islamic revolution that triumphed 31 years ago this week. No compromise is in sight.

Opposition leaders Mirhossein Mousavi and Mehdi Karoubi have called for more anti-government rallies on Thursday, the climax of official anniversary celebrations. But they acknowledge that the youthful protest movement has dynamics beyond their control.

Iran also faces growing Western calls for targeted sanctions after President Mahmoud Ahmedinejad on Sunday ordered production of higher-grade uranium, stirring fears that Tehran aims to make nuclear bombs, not just fuel for civilian use as it says [ID:nLDE61705I]

Iran's oil-based economy is already under financial strains that have forced Ahmadinejad to seek cuts in fuel, food and other subsidies which, if enacted, could stoke popular discontent.

The Islamic Republic has survived many challenges, not least a 1980-88 war started by Iraq's Saddam Hussein, whose forces were propped up by Gulf Arab oil money and Western weaponry.

But the national unity forged in that trauma has long given way to rifts within clerical and political elites that widened after Ahmadinejad was re-elected in a June vote. His foes cried foul. Street protests have flared periodically ever since.

Iran is ready for a real change, said Beirut-based Iraqi sociologist Faleh Abdul-Jabbar. The broad social alliance that brought Ayatollah Ruhollah Khomeini to power is fractured now.

Poor citydwellers and migrant peasants formed the bulk of the urban masses which helped Khomeini topple the U.S.-backed shah in 1979, he argued. The middle classes have since grown, helped by economic reform, cultural relaxation and relative prosperity under Ahmadinejad's more moderate predecessors.

The clerical class that was united behind Khomeini is split. The political elite is also divided, Abdul-Jabbar said.

Protesters angered by alleged election rigging have proved resilient, marching with their green emblems time and again, despite violent crackdowns, mass detentions and even executions.

The authorities, who have deployed religious Basij militia alongside other security forces to crush past protests, last week said nine more people would be hanged soon in connection with post-election unrest. Two were hanged the previous week.

PROSPECTS FOR COMPROMISE

Some conservative politicians opposed to Ahmadinejad have proposed differentiating opposition critics from rioters, but the president, backed by the powerful Revolutionary Guard organization and its Basij auxiliary, has given no ground.

In December Mousavi dropped his previous insistence on cancelling the June election, setting out opposition demands that seemed to leave some room for a deal with the authorities.

But he hardened his tone last week, saying repression showed that the revolution had not achieved its goals. Filling the prisons and brutally killing protesters show that the roots of ... dictatorship remain from the monarchist era, he declared.

No compromise is possible unless sanctioned by Supreme Leader Ayatollah Ali Khamenei, who openly backed Ahmadinejad after the election, harming his own status as a lofty arbiter.

The question is whether Khamenei will sacrifice Ahmadinejad or stick to him and challenge the people, said Ali Nourizadeh, of the London-based Center for Arab and Iranian Studies.

He said Khamenei might opt to replace the abrasive president with a conservative figure such as Ali Larijani, the parliament speaker, or Mohammad Baqer Qalibaf, the mayor of Tehran.

Some in the opposition who now demand far bolder changes than ousting Ahmadinejad might see this as window-dressing.

Such compromises might have worked five months ago, but not now, said Ali Ansari, at St Andrew's University in Scotland. There's a serious threat of further radicalisation.

Some protesters have mocked Iran's clerical leadership with cries of Down with the dictator aimed at Khamenei.

Both sides face a dilemma in reaching across the divide.

If they don't compromise, the country risks descent into political chaos. If they do, they will face a severe backlash from some of their more passionate supporters, Trita Parsi, who heads the Washington-based National Iranian American Council.

In the case of the Greens in particular, it is not clear to what extent the streets would accept a compromise struck by the movement's informal leaders, he said of the opposition.

LEVERS OF POWER

Iran's leaders face unprecedented challenges, but it would be rash to predict the imminent demise of an entrenched system.

They still have the keys of the military and security institutions and have regained the initiative, said Mustafa Alani, a security analyst at the Gulf Research Center in Dubai.

Hardliners would use foreign pressure on the nuclear issue to justify repression of agents or saboteurs at home, he said.

Ahmadinejad may need scapegoats to divert blame for subsidy cuts he hopes will save up to $100 billion a year and make Iran less vulnerable to any Western sanctions on petrol imports -- although diplomats say likelier targets include Iranian banks, shipping firms and companies run by the Revolutionary Guards.

Even if Ahmadinejad stays in power until the end of his term, he will be the weakest president since the revolution, said one Iranian analyst, who asked not to be named. He has no prestige internationally and no legitimacy inside Iran.

Ironically, Iranian hardliners may see intransigence as the best way to avoid the mistakes of the shah, perceived to have contributed to his own downfall by making late concessions.

Standing firm, reacting harshly and turning their own crowds out in the streets are their way of forestalling yet another revolution, wrote Hawaii University's Farideh Farhi.

(Editing by Samia Nakhoul)