By Jim Muir
Former BBC Tehran correspondent
Street protests have fizzled out in Iran
Three weeks after Iran was shaken by its most serious unrest since the 1979 revolution, the dust seems to have settled.
Banned and broken up by force, the largely peaceful, massive protest demonstrations have fizzled out.
The Guardian Council - the powerful, appointed watchdog body - has formally endorsed the re-election of Mahmoud Ahmadinejad, whose unexpectedly large declared margin of victory triggered the protests.
On the face of it, Tehran and other Iranian cities now look much as they did before the 12 June elections.
So does that mean everything is back to normal, and nothing has changed?
That seems unlikely.
The disturbances, and the crisis they expressed, have left much unsettled business, and many unanswered questions.
For one thing, there is an unresolved political rift that is a standing challenge to the ascendant hardliners and the Supreme Leader, Ayatollah Ali Khamenei.
Mir Hossein Mousavi has not been seen in public for days
Two of the three defeated candidates, Mir-Hossein Mousavi and Mehdi Karroubi, have kept up their outspoken defiance, repeating their demand for fresh elections and rejecting the legitimacy of any government headed by Mr Ahmadinejad.
They are openly supported by the two-term former President, Mohammad Khatami, whose reformist platform won him landslide victories in 1997 and 2001.
While they and their millions of supporters may be powerless to confront the system's instruments of enforcement, their declarations raise issues that go to the heart of the Islamic Republic, its identity and values, and the legitimacy of those now running it.
These men are not outsiders. With justice, they call themselves and their associates - many of whom have been arrested - "sons of the revolution".
They all have long histories of involvement in the revolution against the Shah and in the increasingly Islamist system that followed.
In addition to Mr Khatami's two terms as president, Mr Mousavi was twice prime minister in the 1980s, and Mr Karroubi was twice speaker of the Iranian parliament as well as a leading figure in clerical political organisations.
Mr Mousavi is also, it is reported, a cousin of the Supreme Leader.
In his latest statement, Mr Mousavi - who insists he was cheated of election victory - frontally challenged the status quo.
"From now on, we will have a government which is in a most dire situation with regard to its relationship with the nation," he said.
Some Iran-watchers go so far as to argue that the Ayatollah is almost a prisoner of the populist president
"The majority of people, to which I also belong, do not accept its political legitimacy.
"Danger lies ahead. The system which for 30 years was based on the trust of the people, cannot replace the people with security forces overnight. People's trust is seriously damaged."
Mr Khatami, addressing the families of followers who have been detained, was equally outspoken.
"Those who have suppressed people's protests have destroyed the greatest asset of this system, the confidence of the people, " he said.
"In a propaganda climate which is constantly spewing poison into society, the progressive and peaceful movement of the people is being portrayed as a rebellion, a colour-coded revolution, instigated by foreigners.
"A velvet revolution is being staged against the people and against the republicanism of the system.
"Protests that are suppressed will fester and will continue, although their forms might change."
What are colliding here are two conflicting visions of what the Islamic Republic should be - a hitherto unresolved contest that has been visible in different forms since the early days of the revolution.
Mr Ahmadinejad has the public support of the Supreme Leader
One is a strict interpretation of the concept of "Velayat e Feghih", or the Rule of the Jurisprudent, a system elaborated by, and initially tailored to, the Imam Khomeini, whereby power and authority come from God and are channelled through the Supreme Leader, whose word is unchallengeable.
The other is a more liberal, humanistic approach, exemplified by former President Khatami's advocacy of mardom salari or "sovereignty of the people", whereby authority ultimately comes from the popular vote, officials are accountable, and the Leader has a benign, supervisory role.
Until his death in 1989, Ayatollah Khomeini believed in keeping a balance between these vying philosophies as well as between the various competing power centres which make up the complex Iranian leadership structure.
But the past weeks have seen an abrupt lurch away from that policy of balance.
In his Friday prayers speech on 19 June, Ayatollah Khamenei made it clear that he sides with the controversial President re-elect Mahmoud Ahmadinejad.
Since then, the system's mechanisms of defence and control have been mobilised to protect Mr Ahmadinejad's announced victory and to suppress dissent.
But can an entire trend, with deep historical roots and enough public support to give it landslide victories in the past and encourage it to think it has been cheated this time, simply be suppressed without consequence?
Some ruling circles appear to think so.
"The ideals of the reform movement have now been destroyed," said the government newspaper Iran.
"Its impractical ideas of freedom, tolerance and civil society failed to attract support among the ordinary people who wanted social justice and an end to poverty."
But the fact is that the Supreme Leader and his ally Mr Ahmadinejad face a dilemma.
The opposition leaders remain vocally defiant. The only way to silence them would be to arrest or kill them.
That would make them heroes and martyrs to their millions of followers, as well as dramatising, for all to see, the magnitude of the system's internal crisis.
Their defiance, flouting the clearly stated views and wishes of the Supreme Leader, carried a step further the process of demystifying his authority that was an inevitable consequence of his openly taking sides in the dispute.
It has become a thoroughly worldly power struggle pitting Ayatollah Khamenei and Mr Ahmadinejad, with all the forces under their command, against the reformists and their sympathisers.
Caught unhappily in the middle are numerous other influential figures and forces, many of them to the right of centre in the political divide.
Many important conservative figures not connected to the reform movement, such as Parliament Speaker Ali Larijani, former Speaker Ali-Akbar Nategh-Nouri, and former Foreign Minister Ali-Akbar Velayati, are no fans of Mr Ahmadinejad.
Neither is the powerful and wealthy, two-term former President Ali Akbar Hashemi Rafsanjani, who is widely believed to have worked strongly against Mr Ahmadinejad during the election.
Very few of the Qom-based Islamic clergy, who are supposed to be the backbone of the system, have openly supported or congratulated the president on his re-election victory.
A number of very senior liberal-minded clerics have outspokenly denounced what has been happening, including Ayatollahs Montazeri, Sanei and Taheri.
Ayatollah Khamenei's clerical credentials were already questioned by some when he was appointed Supreme Leader in 1989.
Relations with West
Now, the whole issue of the Leaderhip, the Velayet e Feghih and the role of the clergy in politics must be an issue of hot debate in the seminaries.
Many are believed to have become alarmed by the increasing militarisation of the system that has occurred under Mr Ahmadinejad, a layman, who first become president in 2005 and filled many posts with former Revolutionary Guards officers.
So much so that there is much inconclusive discussion among Iran-watchers about who pulls the strings in his relationship with the Supreme Leader.
Anti-British protests have been held outside the UK embassy in Tehran
Some go so far as to argue that the Ayatollah is almost a prisoner of the populist president.
Some of the more moderate voices on the right are calling for an accommodation of some sort to reconcile the contradiction that has become so glaringly unresolved.
But for the moment, the powers that be seem to be bent on a course of trying to repress dissent and blaming the unrest on outsiders in general and Britain in particular.
The arrest of several Iranian employees of the British embassy in Tehran, for alleged involvement in stirring up the disturbances, threatens to aggravate the considerable effect the events have had in further complicating Iran's already troubled relations with the West.
All 27 members of the European Union on Friday called in Iranian ambassadors to protest against the detentions.
This was a lesser step than advocated by London, which wanted to see EU ambassadors withdrawn from Tehran - a move which might be next on the agenda should the employees be put on trial and sentenced.
All this underlined how far relations have worsened since five or six years ago, when the then British Foreign Secretary Jack Straw was a frequent visitor to Tehran in pursuit of "constructive engagement" over Iran's nuclear ambitions.
The prospects for a dialogue between Tehran and Washington also appear to have been dealt a sharp setback.
Aware that the last thing the reformist protesters needed was a pat on the back from him, US President Barack Obama initially tried to keep well out of it, while expressing concern for human rights.
But as the drama intensified and the images of violence became harder to ignore, neutrality also became harder to stick to and the language toughened, drawing a sharp response from Tehran.
Beyond the difficulties raised by the rhetorical exchanges, Mr Obama faced the dilemma that dealing with an Ahmadinejad-led administration would be seen as endorsing a setup whose legitimacy was being questioned by the very forces with which the US is most in sympathy.
At the very least, the turmoil in Tehran is likely to lead to a delay in the start of any serious contacts between the US and Iran, a process which Mr Obama had hoped to be able to assess by the end of the year.
For him, the disputed election outcome is the worst possible result. Had Mr Ahmadinejad emerged victorious and without dissent, Washington would clearly have had no qualms about entering a dialogue as soon as it became possible.
However, Tehran's current self-absorption may have some dividend for Mr Obama, who, on 4 July, got an exceptionally warm Independence Day message from President Bashar al-Assad of Syria, with a verbal invitation to visit Damascus.
Syria has a long-standing strategic alliance with non-Arab Iran, mainly based on shared hostility to their mutual neighbour Iraq under Saddam Hussein.
But after four years of tension, Washington is sending an ambassador back to Damascus and relations are slowly warming.
Syria is not going to break with Tehran in a hurry. But chaos in Iran would certainly make it easier for Damascus to slip quietly into other relationships.