Iran's Supreme Leader Ayatollah Ali Khamenei prayed at Tehran University
By Jim Muir
Former Tehran correspondent, BBC News
It was an extraordinary speech for extraordinary times.
In his Friday prayers address, Iran's Supreme Leader Ayatollah Ali Khamenei spoke more frankly than he ever has before about the politics of the Islamic Republic.
But in essence he defended the disputed election victory of President Mahmoud Ahmadinejad, and threw the ball firmly into the court of his challengers, headed by runner-up Mir Hossein Mousavi.
They now face a searing dilemma.
The leader bluntly told them they must call off the massive, if peaceful, street protests they have staged since the election results were declared.
He said they were an illegal and wrong-headed attempt to pressure officials into giving in to their demands, that the protests provided cover for provocateurs to stir violence, and that the political leaders concerned would be responsible for the consequences if they did not stop.
Mr Mousavi and his associates now have a tough decision to take.
Pro-Mousavi supporters have rallied throughout the week
So far, their protests have been portrayed as an attempt to correct a perceived electoral injustice.
If they continue, they will immediately become - and be dealt with as - a direct challenge to the supreme leader and the Islamic system which he heads and epitomises.
That may have been implicit before, at least for some of the many thousands who have attached themselves to the protest movement.
But now it is explicit, and the security forces - and their paramilitary auxiliaries such as the Basij militia - may feel free, and indeed obliged, to suppress demonstrations which they have so far largely tolerated.
Is that a step Mr Mousavi is willing to risk taking? Is he ready to confront the whole Islamic system in that way?
On the other hand, if he backs down and calls off the protests, hundreds of thousands, if not millions, of people whose longings for change and reform had been aroused once again, will be left frustrated and disillusioned once more.
Behind the scenes
As the leader pointed out in his address, Mr Mousavi is not an outsider.
He was prime minister for eight years during most of Iran's war with Iraq in the 1980s, when Ayatollah Khamenei himself was president.
Mr Mousavi's close associate and predecessor as leader of the reform movement, former President Mohammad Khatami, never encouraged his many followers to take to the streets to demonstrate people power.
He believed in quiet dialogue behind the scenes - though his efforts at persuasion fell on deaf ears as the hard-liners blocked all his efforts to pursue reform and change.
In his Friday address, the leader had little comfort to offer the protesters apart from repeating that the highly conservative election watchdog, the Council of Guardians, could recount disputed ballot boxes if complaints justify it.
That is far short of what Mr Mousavi and his allies have demanded.
They want at least an independent investigation into the election as a whole, or preferably, its annulment and a re-run.
They maintain that huge numbers of votes simply went missing, so that recounting specific boxes is meaningless.
But Ayatollah Khamenei said it was impossible that fraud could have been carried out on a scale big enough to produce the margin of 11 million votes by which Mr Ahmadinejad was declared to have won.
Potential for chaos
The three defeated candidates are to have a meeting with the Council of Guardians on Saturday to press their grievances.
President Ahmadinejad (centre) was praised by the ayatollah
That encounter, and however it is followed up, could provide the mechanism for a climb-down by one side or the other, though it is highly unlikely the council would agree to the demand for a complete re-run.
If the dissenters pursue what will now clearly be a collision course, the potential for chaos and upheavals is clear.
If they decide to back down and return to the fold, would the protests have achieved nothing at all, and would the hard line pursued by the leader and the re-elected president be consolidated further?
Or has the Islamic leadership been shaken enough by the display of mass public anger to be willing to make some compensatory adjustments in order to keep the peace?
Ayatollah Khamenei made the extraordinary public admission that the policies of Mr Ahmadinejad are closer to his own on some foreign policy, economic and social issues.
He described him as "hard-working and trusted by all."
But at the same time, he said he had chided Mr Ahmadinejad for some of his statements in televised election debates where he had bitterly attacked one of his strongest political adversaries, Akbar Hashemi Rafsanjani.
The leader spoke openly of the rift between Mr Rafsanjani and Mr Ahmadinejad, and admitted that his own views were closer to those of the president re-elect.
Mr Rafsanjani is seen as a pillar of the Islamic system
But at great length, he defended and warmly praised Mr Rafsanjani as a pillar of the Islamic Republic, saying he had known him personally for 52 years as someone who had given and sacrificed everything to the Islamic cause.
During the election campaign, it was no secret that Ayatollah Rafsanjani used his very considerable influence against Mr Ahmadinejad and in favour of the reformist candidate, Mir Hossein Mousavi.
Some Iranian analysts believe that Ayatollah Khamenei feared that a big reformist victory backed by Mr Rafsanjani would sweep Mr Ahmadinejad from the scene and leave the leader himself isolated on such major issues as relations with the United States and Iran's nuclear ambitions.
Fears and suspicions have also been voiced that an unchecked Ahmadinejad victory might be followed by purges and crackdowns in which Mr Rafsanjani himself might be politically eliminated.
The leader's prolonged and unstinting tribute to Mr Rafsanjani's continuing and historical status as a pillar of the Islamic system makes that now seem extremely unlikely, unless something very major changes.
Mousavi supporters may be frustrated by a lack of change
Mr Ahmadinejad himself had initially likened the election protests to outbursts by football fans whose team had been beaten.
But on Thursday he made a statement in which he demonstrated considerably more respect for the large mass of people who took to the streets in peaceful and often silent protest.
Whether that would mean that the reformists' views would be taken more into account, and perhaps reflected in the formation of the new government, is of course not clear.
But if a collision on the streets is averted, the scenario shaping up could be this:
• President Ahmadinejad survives, with the support of the leader, and chastened by the impressive outburst of public anger towards him
• Hashemi Rafsanjani survives as a counterbalance, again with the support of the leader despite their acknowledged difference of views on some issues
• The leader himself survives, having re-established balance within the system and reasserted his own position as its arbiter and protector
If that is how the situation is resolved, it may avert a situation of wholesale bloodshed, upheaval and disruption.
But it would also leave millions of Iranians angry and bitterly disillusioned, having had their hopes for change raised and dashed once more.