If one image summed up Iran's miniature July revolution, it was the triumphant march of Revolutionary Guards through the deserted streets of Tehran on Tuesday night. Broken glass crunched beneath their boots, and as the soldiers held high their assault rifles, they were careful not to trip on the stones and rubble on the ground before them.
A few hours earlier, the capital of the Islamic Republic had been a battle zone where angry young men sacked three banks and two mosques, set fire to cars, bus shelters and tyres. The rioters looted shops and tried to storm the interior ministry and the Kayhan newspaper building, symbols of the mullahs' strict rule. With an ample dose of tear gas and gunfire, the Revolutionary Guards regained control of a city that had slipped into anarchy.
That evening, as paramilitary Basij ("volunteers") set up check-points throughout Tehran, President Mohamed Khatami went on television to demand an end to the protests. For once, the face of the kindly, much-loved cleric was unsmiling.
For the first three days, from July 8th until the 10th, student groups that support Mr Khatami - one of them led by his brother - had maintained a tenuous control of the demonstrations, and they appeared to be winning. Even Ayatollah Khomeini's successor as Guide of the Revolution, Ayatollah Ali Khamenei, condemned the brutal police attack on a student dormitory that precipitated the unrest.
The students demanded simple things - the freedom to speak, think and dress as they please, shown by their attempted liberation of a van-load of women arrested because their hidjab (Islamic covering) was deemed insufficient. But after three days the protests began to grow violent, culminating in the orgy of looting and burning on July 13th.
President Khatami is the hero of students, women, city-dwellers and intellectuals who were won over by his vision of a "civil society", of an Iran ruled by law and freed of thugs like the Ansar Hezbollah vigilantes dispatched by fundamentalist clerics to harrass opponents.
The student protesters carried posters of Mr Khatami and dared to criticise Ayatollah Ali Khamenei - an offence punishable by death. Under Iran's Velayat-e-Faqih, Mr Khamenei is Allah's representative on earth, above all institutions. Although he was not elected by popular vote like Mr Khatami, Mr Khamenei retains control of the legislature, the judiciary, the police and the armed forces. He has used these powers to attack Mr Khatami's supporters and paralyse his reform programme.
Anti-Khamenei slogans showed that a large segment of the population have come to resent him: "Ali Pinochet, Iran will not be Chile" and "Death to the Dictator" were among them.
And yet, there on television screens, was President Khatami referring to Mr Khamenei as "the great leader". For days, the students had placed their hope in Mr Khatami, begging him to come to their assistance. Torn between his sympathy for them and his role as Iran's head of state, on Tuesday night Mr Khatami betrayed their hopes, calling for an end to the demonstrations. "The violence and disturbance were against the interest of the system . . . against the interest of the nation," he said. The slogans they chanted were "meant to create divisions and engender violence in society".
One of the conspiracy theories circulating in Tehran is that the conservatives plotted the police assault on the student dormitory and the subsequent repression of demonstrations to prove to Mr Khatami's followers that he is incapable of protecting them.
Mr Khatami tried to distinguish between the student groups who support him - who distanced themselves from the demonstrations after the third day - and the violent protesters who ransacked downtown Tehran. "Some of the arrested people were not students," he said, leaving open the question of just who they might be.
On television footage of the disturbances, the clean-cut, western look of the rioters was striking. The young men wore blue jeans and baseball caps, and none of them had Islamic beards. Most were probably ordinary youths so frustrated with the absence of reform or freedom or jobs in Iran that they went on a rampage. Some may have been agents provocateur from Ansar Hezbollah and other pro-Khamenei forces. Others could be supporters of the Iraq-based People's Mujahedeen, which has in the past received funding from the CIA to set off car-bombs in Iranian cities.
In the conservative backlash that followed, demonstrators were called "counterrevolutionaries" and "enemies of God" - offences that carry the death penalty. Hundreds, perhaps thousands of young people were detained, and many Iranians fear that those loyal to Ayatollah Khamenei will now sideline President Khatami, enact the hated press censorship law (which helped spark the protests) and hang those arrested. Under this scenario, the conservatives would use their sway over the Council of Guardians, which vets candidates for public office, to retain control of parliament in the February 2000 election.
President Khatami is believed to have sacrificed the student demonstrators so as not to endanger longer-term goals. He has gained some ground lately, notably a nationwide victory by his supporters in last February's municipal elections. In May, his minister of culture and Islamic guidance, Ayatollah Mohajerani, survived the conservative parliament's attempt to impeach him for allowing books and films that "promote corruption, prostitution and homosexuality" to enter Iran.
At the end of August, the conservative justice minister Mohamed Yazdi was to have been replaced by a more neutral figure. And based on wide popular support, Mr Khatami was more or less certain that his supporters would win the February 2000 poll. Many Iranians believe the conservatives provoked last week's crisis to stop Mr Khatami's progress. Although the students were bitterly disappointed at his disavowal of them, some hope the fundamentalists may be cowed by the support he enjoys and perhaps re-open the pro-Khatami newspaper Salam or abort the press law.
The seeds of last week's unrest lie in a bizarre tale of Persian intrigue, of the murky repression by Islamic fundamentalists of those who threaten their hold on power. After five Iranian intellectuals were murdered last winter, President Khatami revealed that Iranian intelligence services organised the killings. In February, the relevant minister resigned after admitting that his agents were involved. One man, Said Emami, was arrested and imprisoned. Last month, it was announced that he had conveniently committed suicide in prison by swallowing depilatory cream. Mr Khatami's followers feared the president had yet again compromised, allowing the investigation to bog down because it led to his high-ranking opponents.
Then, in the second week of July, Salam published a top secret report on the press written by none other than the late intelligence agent and murderer of intellectuals, Said Emami. Salam revealed that Mr Emami's report served as the basis of the new press law. Thereupon, the newspaper was suspended and the students began demonstrating.
Every article on Iran should contain a warning about terminology. Over the past decade, the meaning of "moderate" and "conservative" in Iranian politics has flipflopped. The good guys have become the bad guys, and vice versa. The strongest faction of Khatami supporters - now "the moderates" - are former radical left-wing Islamists who seized the US Embassy in Tehran in 1979 and held diplomats hostage. This group, which gravitated around Hojatoleslam Ali Akbar Mohtashemi, supported the taking of western hostages in Lebanon, but also sought greater equality for the poor. Today they spearhead the drive for a more open and free Iran.
In the early 1990s, then President Ali Akbar Hashemi Rafsanjani was the "moderate" who freed hostages in exchange for favours, tried to develop trade with the West and successfully drove Mr Mohtashemi from politics.
Today, Mr Rafsanjani is a "conservative" allied with the Guide and the parliament. A few months ago, he published his memoirs, entitled Getting Through the Crisis, in which he recounted the overthrow of post-revolutionary Iran's first liberal president, Abolhassan Bani Sadr, in 1981.
As speaker of parliament, Mr Rafsanjani shut down newspapers favourable to Mr Bani Sadr, then forced him into a situation where he had to give in to the conservatives or resign. Iranians understood the message: the conservatives propose using the same strategy to topple President Khatami today.