While election fraud is possible, the most likely explanation of Ahmadinejad's victory at this point is that over his four years in office he has cultivated a huge base of support among Iran's rural and lower class population. In addition, he presented himself towards the end of the campaign as a candidate willing to oppose Iran's notoriously corrupt old-guard clerical power structure, seemingly at some risk to himself. An article in the Guardian by Abbas Barzegar gives an inside view:
I have been in Iran for exactly one week covering the 2009 Iranian election carnival. Since I arrived, few here doubted that the incumbent firebrand President Mahmoud Ahmedinejad would win. My airport cab driver reminded me that the president had visited every province twice in the last four years – "Iran isn't Tehran," he said. Even when I asked Mousavi supporters if their man could really carry more than capital, their responses were filled with an Obamasque provisional optimism – "Yes we can", "I hope so", "If you vote." So the question occupying the international media, "How did Mousavi lose?" seems to be less a problem of the Iranian election commission and more a matter of bad perception rooted in the stubborn refusal to understand the role of religion in Iran.... ... ...
Perhaps from the start Mousavi was destined to fail as he hoped to combine the articulate energies of the liberal upper class with the business interests of the bazaar merchants. The Facebook campaigns and text-messaging were perfectly irrelevant for the rural and working classes who struggle to make a day's ends meet, much less have the time to review the week's blogs in an internet cafe. Although Mousavi tried to appeal to such classes by addressing the problems of inflation and poverty, they voted otherwise.
I had hoped Mousavi would win. That would have made it a lot easier for tensions between Iran and the US to dissipate. It looks like that was not the primary concern of Iran's voters on Friday. Quite possibly the reason the candidate who clearly would have made Iran's foreign policy objectives easier to reach was not elected is because most Iranian people does not feel threatened by the US or Israel right now, and so felt free to focus on domestic issues. That is their right and they are to be congratulated for exercising it.
Mousavi never posed a threat to Iran's nuclear program or to the legitimacy of Iran's Supreme Leader. If there was to be a monumental fraud, who would orchestrate it and why? Iran's power brokers behind the scenes oppose Ahmadinejad, famously so in that Akbar Rafsanjani, current chair of Iran's Assembly of Experts, actually wrote an open letter to Iran's Supreme Leader asking him to restrain Ahmadinejad.
Westerners are shocked and disappointed by this election, but Iran's voters have every right to shock and disappoint Westerners.