Despite the convulsions in Tehran's streets in the aftermath of a disputed presidential election, Iranians  and the smart folks in Washington  know that Iran's presidency is not the seat of executive power. Unelected mullahs hold veto power over the decisions of the elected government, and their Supreme Leader, currently Ayatullah Ali Khamenei, must approve all political policies and make the key foreign policy and security decisions. No one can run for president without the approval of the clerics, and they routinely narrow the field to those deemed acceptable within the parameters of the Islamic Revolution.

Still, the presidency is far from unimportant. It is a critical part of the "managed democracy" that the ruling clerics have used to govern Iran for the last three decades. Khamenei himself is a former President. The job is important enough to have brought millions of Iranians to the polls on Friday, and thousands into the streets afterwards  both supporters of the apparent loser, reformist candidate Mir-Hossein Mousavi, and members of the radical volunteer paramilitary forces who support the reelected President Mahmoud Ahmadinejad. (See pictures of Iran's controversial and violent election)

Yet Khamenei has now done something extraordinary to the regime's democratic apparatus. Even though Iran's Electoral Commission allows three days to hear challenges before presenting results to Khamenei for approval, the Supreme Leader rushed to put his seal of approval on the outcome, and warned all political factions to refrain from challenging it. His imposition of the result, just hours after the polls closed, stunned the country as doubts about the legitimacy of vote were voiced widely both inside and outside Iran. ((Read TIME"s coverage of Iran's post-election street fighting)

The very way Iran is ruled is now in convulsion. Since the revolution of 1979 brought on the Islamic Republic, Iran has been governed by a power structure that combines unelected clerics with an elected legislature and presidency. Under the revolution's principle of velayat e-faqi or "guardianship of the jurisprudent," ultimate political authority rests in the hands of the Shi'ite clergy, first among them the Supreme Leader, chosen by an unelected Assembly of Experts. Still, the regime always sought to affirm its legitimacy through holding elections for parliament and the president.

Despite clerical restrictions, the country's democratic institutions have been capable of surprising and rebuking the conservative mullahs  as occurred in 1997, when reformist Mohammed Khatami won the presidency by a landslide. But if Khatami's failed reformist tenure highlighted the limits of the power of Iran's presidency, the Supreme Leader has also traditionally sought consensus within the regime. While Khamenei has clearly favored those, like Ahmadinejad, who most closely reflect his own views, he has tried to protect the cohesion of the Islamic Republic's system by seeking to balance the influence of competing factions within its political establishment.

The system actually allows the Supreme Leader to present different faces to the world. While he has strongly backed Ahmadinejad, for example, Khamenei also for a time designated one of the president's key pragmatist critics, Ali Larijani, as the point man in negotiations with the West over Iran's nuclear program.

The democratic element of Iran's system has functioned as an important safety valve for clerical rule by creating a managed channel for the release of popular frustrations. But now the Supreme Leader appears to have thrown his weight solidly behind what many are charging is a carefully staged putsch by Ahmadinejad. "The willingness of the regime simply to ignore reality and fabricate election results without the slightest effort to conceal the fraud represents a historic shift in Iran's Islamic revolution," Columbia University Iran expert and former National Security Council official Gary Sick wrote in a web posting. "All previous leaders at least paid lip service to the voice of the Iranian people. This suggests that Iran's leaders are aware of the fact that they have lost credibility in the eyes of many (most?) of their countrymen, so they are dispensing with even the pretense of popular legitimacy in favor of raw power."

Not only was a questionable election result likely to prompt street protests and provide ammunition to hawks in the West, it also affirmed a challenge to much of the Islamic Revolution's established political class. Ahmadinejad branded the entire revolutionary establishment as feckless and corrupt, prompting appeals to Khamenei from former President Hashemi Rafsanjani, head of the Assembly of Experts, who was one of Ahmadinejad's chief targets. But he and others got little sympathy for their complaints that the president's attacks undermined the legitimacy of the revolution itself. Some tartly pointed out that since Khamenei himself was president from 1981 to 1989, Ahmadinejad's claim that his is the first Iranian administration that was not corrupt was a slap at the Supreme Leader.

Khamenei's backing of the disputed election results has surprised many in Iran, precisely because it is directed against a substantial segment of the revolution's political establishment. Just as Mao Zedong, in China's Cultural Revolution, unleashed a campaign of terror carried out by poorer young people against what he decried as the more liberal, "bourgeois" elements of the communist party, so does Ahmadinejad claim to be waging a class war, with the backing of the poor and the security forces, against a corrupt political elite brought to power by the revolution. And he clearly has Khamenei's backing.

Some analysts believe Khamenei is motivated by a desire to prevent Iran from normalizing its relationship with the West, fearing that removing the external "threat" against which it was constructed will fatally undermine the Iranian political system. Ahmadinejad's critics charged during the campaign that his provocative antics had undermined Iran's standing in the world, but he certainly functions to restrain any movement toward rapprochement, keeping in place the fear of the "Great Satan" that has been an organizing principle of Iran's authoritarian clerical regime.

Not that Iran won't seek agreements with U.S. on areas of conflict that could lead to confrontation. Khamenei may believe that his regime's best hope of survival is keeping his country on a war-footing against an external enemy, but an actual war would be disastrous for the regime. And ensuring the survival of the regime has been Khamenei's guiding principle. His response to the election, however, suggests that he's ready to break the mold of three decades of governance in the Islamic Republic. Whatever comes next, the events of the June 12 presidential election will be remembered as a turning point in Iran's revolutionary history; a moment when Ayatullah Ali Khamenei rolled the dice.