Street protests in Iran are important but are themselves not enough to force change. The supreme leader will not be swayed because he considers himself accountable to God, not to the people. Indeed, even the Islamic Republic's clerical establishment is irrelevant in this calculus. President Mahmoud Ahmadinejad's invocation of folk religion -- his appeals to the messianic Hidden Imam, for example -- is a way to bypass senior religious figures who, according to Shiite theology, will be among the greatest obstacles to the Hidden Imam's return. Nor does the supreme leader, Ayatollah Ali Khamenei, pay too much heed to his fellow clerics in Qom. They have always refused to bestow on Khamenei a level of religious legitimacy to match his ambition. Today, the majority of Iran's grand ayatollahs oppose the concept of theological rule. Not by coincidence, the majority are now in prison or under house arrest.

Khamenei can weather the public's disdain so long as the Revolutionary Guard serves as his Praetorian Guard. Khomeini, the Islamic Republic's founder, formed the Revolutionary Guard to defend his revolutionary vision. It is more powerful than the army and answers only to the supreme leader. That the Islamic Republic has lost legitimacy in the eyes of the Iranian public is now evident to the outside world, but it is not news to the regime. In September 2007, Mohammad Ali Jafari, the new Revolutionary Guard chief, reconfigured the force into 31 units -- one for each province and two for Tehran -- on the theory that a velvet revolution posed a greater threat to regime security than any external enemy. Guardsmen are not stationed in their home cities so that they do not hesitate to fire on crowds that might include family and friends.

In the public mind, the Islamic revolution 30 years ago looms large. The regime is not aloof to this. It understands the shah's mistakes and is determined not to repeat them. Next month marks the 10th anniversary of the student uprising, which erupted after the security forces attacked a student dormitory. Their brutality shocked the Iranian public, and demonstrations spread throughout the country. For a few days, regime survival was also subject to speculation.

In the aftermath of the protests, the Chinese government supplied security consultants to Tehran. Rather than bash heads and risk protests and endless cycles of mourning, Iranian security services began photographing demonstrations, after which they would arrest participants over the course of a month when they were alone and could not spark mob reaction. With the assistance of European businessmen, the Iranian government upgraded its surveillance of communication (and the Internet).

Ultimately, the theocracy will fall only if servicemen in the Revolutionary Guard switch sides. There will be compromise. The end will come only over Khamenei's dead body. Certainly, Iran today is a tinderbox. The question is whether the regime is better at putting out fires than demonstrators are at starting them.