We need to be very careful not to rush out ahead of events in judging what is happening in Iran. We do not yet know whether Ahmadinejad will stay, whether Mousavi will somehow be given a second chance, and if the ongoing political struggle will affect the security of the Supreme Leader. Mass demonstrations are not national popular uprisings, and popular uprisings do not always lead to successful revolutions. Truly radical change may come, but it has not come yet. One has only to contrast the radically different outcomes of what happened in East Germany and Tiananmen Square to realize that "experts" cannot predict the nature and outcome of the events now taking place in Iraq.
What is clear is from his Friday sermon is that the Supreme Leader has backed Ahmadinejad and the election. It also is clear that any reliance on the Council of Guardians to review the election puts the review firmly under those loyal to the Supreme Leader. Since Khamenei controls the media, security forces, military, intelligence, and justice system this should ultimately give him the power to suppress popular protests -- particularly if he continues to rely on quiet, selective arrests rather than the kind of open repression that could trigger a true popular uprising.
At the same time, while the Supreme Leader did firmly back Ahmadinejad and the legitimacy of the election in his Friday prayer, and he cannot put this genie back in the bottle. Khamenei has always had uncertain credentials as a religious scholar and he now has uncertain credibility as a leader. Everyone in Iran, the Middle East, and the world now has reason to question the legitimacy of every element of Iran's leadership and the Iranian revolution. The Iranian leadership now has to realize that it is more divided than was ever apparent before and that Iran's people and the world know it. It has to see just how much anger there is at the Mullah's level of social repression and the failures in the Iranian economy. The leadership can only quickly ease the social repression side of this equation. It would take years of effort to make a major difference in economic development. As a result, even apparent success by the current leadership will to some extent be lasting failure. This may not have a Berlin Wall kind of ending, but Iran is not China. The lasting impact is much more likely to be similar to the decades long impact of the repression of the uprisings in Hungary and Czechoslovakia.
It also is impossible to rule out some form of Mousavi victory, both now and over the months to come. Whatever happens, if Ahmadinejad stays without a truly legitimate election, the result will fester, not go away. Every embarrassing new piece of excessive rhetoric, every new threat to Iran's neighbors, every new problem in the economy, and every new act of social repression will be a reminder of the fact that Iran's leadership has questionable legitimacy at best.
The less visible problem will be Khamenei. He did not exactly buy his Ayatollahship as a mail order degree, but he largely bypassed the process that would have demonstrated that he had the level of scholarship required. Now he has cast the political and ethical legitimacy of the role of Supreme Leader into doubt. Many, if not most, true senior Shi'ite scholars and clerics have always had questions about such a role, particularly outside Iran. They now have far more reason to question whether any one individual can ever have the sanctity and wisdom required. The issues raised by other key Ayatollahs like Montazari, and mainstream "quietest" clerics, are ones that will now take on a whole new and lasting character and have far more impact and credibility.
In short, no one can yet predict Iran's political future, but some things seem clear. Even if Ahmadinejad stays, and the current regime outlasts the current upheavals, events will play out over months and years to come. At the same time, one needs to be cautious about even the most dramatic change. The struggles in Iran may have led to major popular unrest, but they are still struggles within Iran's revolutionary elite. Even the most dramatic form of Mousavi victory never meant Iran will cease pursuing nationalist goals, stop seeking nuclear weapons and long range missiles, accept Israel, halt its efforts to develop Shi'ite influence and some form of alliances that give Iran added power, or end its opportunistic efforts to expand its influence at its neighbors expense. Even the most dramatic change may not make critical differences to the security and stability of the region.