I said most of what came to mind in my initial reaction here, with the short form being that I expected Rafsanjani to win because Ahmadinejad struck me as being too patently crazy for the mullahs (who were the true arbiters here, whatever the electorate wanted) to put on top. Rafsanjani was already clearly a major player in the regime who knew all the right people and would have been able to almost certainly prolong negotiations with the Europeans for the foreseeable future.
So what happened?
Near as I can tell, Rafsanjani's pragmatism, which seems to include moderating the nastier elements of the Iranian government with respect to their role in the Iraqi insurgency and encouraging negotiations with the Euros. Both of these fly in the face of a lot of people in the Iranian military-intelligence-clerical establishment who feel that they've been too complacent for too long and now have the US on both sides of their border as a result. Having successfully taken control of the Majlis by hook and by crook, these same individuals, the majority of them focused in groups like the Abadgaran movement saw no reason why they shouldn't do the same with regard to the presidency.
Also, contra the assertions of both Ken Pollack and Greg Djerejian, I didn't see any indication that the Iran "hawks" were rubbing their hands together and hoping for an Ahmadinejad victory so that they could press forward with their plans for regime change. Up until the last several days of the campaign, most of us pretty much assumed that Rafsanjani was going to win because he was who we would choose as the most public symbol of the regime if we were the mullahs. You guys think that Pletka op-ed in the New York Times was a false flag operation or something? As for Dr. Ledeen, his most recent column described the showdown between Rafsanjani and Ahmadinejad as being akin to that between Hitler and the SA, which isn't exactly a ringing endorsement for either side.
What needs to be understood about Ahmadinejad is that he represents the most extreme elements of the Iranian regime and while he has little true power apart from Khamenei's desires (as I think we've all learned from the example of Khatami) the EU possibility of some grand bargain with Iran is now effectively dead. I mean, according to designated Middle East Expert™ Juan Cole (in one of the most bizarre exercises of moral equivalence I've ever seen online) he's basically an Iranian version of George W. Bush, which should be reason enough for the Europeans and their fellow travelers to hate him.
As readers know, I never believed that Rafsanjani wanted coexistence with the West, so Greg lamentingthe fact that Iran is not going to be the next China gets few shed tears from me. However, I think this last part summarizes the situation in Iran rather aptly:
Will Ukraine style stirrings now become more likely, with younger Iranians increasingly disenchanted with the consolidation of power by ultra-conservatives? Or will a North Korea scenario take place, with a reactionary circle intent on becoming a nuclear power brutishly and successfully stamping out domestic dissent? Or something else?
This depends, I think, on how clever Ahmadinejad and his backers are and we should keep in mind that since all his elections did was expand Khamenei's stranglehold to the nominally-autonomous presidency that very little was actually accomplished and that things will remain on course for the time being. The more cynical element of me, however, is more than a little tempted to set up a betting pool for when Iran pulls out of the Non-Proliferation Treaty. And while I realize that such a solution is nothing short of an anathema to all the stabiliticists and self-described "realists" out there, my own sense that since the chances for US-Iranian reproachment are now universally recognized as nil and problems with Iran are likely to proliferate that we are now in the position in which the US is going to have to do something about Iran.
You all know my position on the matter, but the question is, what is that something going to be?
SIDEBAR: THE BROKEN POLITICAL SPECTRUM Yet again displaying the utter uselessness of using either Western or faux Kremlinological terms to describe the Iranian political scene, Ahmadinejad is described as an "ultra-conservative" yet his understanding of economics seems to involve a healthy element of Marx on the side. He's also been described as "socially conservative" because he wants men and women to use separate elevators and supports the execution of homosexuals, yet it was his Abadgaran backers in the Majlis that voted to liberalize the nation's abortion laws. Some people have described him as a fascist, yet for all his fondness for the Baseeji brownshirts he doesn't appear to have any of the corporatist tendencies that dominated Mussolini's Italy for all its statism.
Please understand, this is not some knee-jerk "he's a leftist!" screed, though he does kind of look like some flavors of communist if you can get around the religious element, but rather to make the point that a lot of Iranian (or Iraqi, for that matter) political figures really don't fit into our French-based right/left divide and shouldn't be placed there artificially in an attempt to provide a false context.
UPDATE: This just gets better and better. Ahmadinejad is apparently a founder of the Qods Force. Just how close Ahmadinejad still is with them may well come back into the news again given this story that first appeared in the Washington Post back in 2003. The headline "Iranian Force Has Long Ties to Al Qaeda" says it all, but I add some relevant excerpts and analysis.