Although he harbored misgivings that he would again be stymied from governance by Khamenei and the IRGC were he to win office, in February 2009, former President Khatami announced his intention to seek the presidency. Based on name recognition and nostalgia, Khatami seemed like the most viable candidate to win an election against Ahmadinejad, whose iconoclasm and economic shortcomings had dampened enthusiasm among many less extreme conservative Iranians. Ayatollah Khamenei was reportedly enraged by Khatami’s announcement of his candidacy, and he disregarded physical attacks and death threats against Khatami by militant Ahmadinejad backers. Recognizing he was unlikely to pass the Guardian Council’s vetting, Khatami withdrew from the race and threw his backing behind former Prime Minister Mir-Hossein Mousavi, Khamenei’s most hated rival, who reluctantly emerged from the political wilderness to challenge Ahmadinejad.
After Khamenei prevailed to become Supreme Leader and the post of prime minister was abolished, Mousavi spent his time teaching at Shahid Beheshti University in Tehran and serving as the head of the Iranian Academy of Art. He remained a popular figure due to his managerial competence, keeping the Iranian economy afloat during the Iran-Iraq War, and was perpetually courted as a candidate for higher office, but he stayed out of the political realm and the limelight due to implicit threats from Khamenei, according to his wife, who played a prominent role in his campaign. Khatami viewed himself as primarily a cultural rather than political figure and endorsed Mousavi, citing his confidence that Mousavi would be more adept at governing and significantly reforming the Islamic Republican system.
The Guardian Council sought to avoid triggering public unrest and approved Mousavi’s candidacy without objection from Khamenei, assuming he would be unable to gain traction due to his lack of charisma and long absence from public life and politics. The Council also approved Mehdi Karroubi, who had been edged out by Ahmadinejad in the first round of voting in 2005, hoping this would split the reformist vote. Former IRGC commander and perennial candidate Mohsen Rezaei served as the token conservative challenger to Ahmadinejad.
Khamenei’s decision to allow Mousavi and Karroubi to run showed that he underestimated the resilience of the public’s desire for the reformist agenda. He had cracked down on the 1999 student protests and engineered Ahmadinejad’s 2005 electoral victory without shaking the foundations of the revolutionary system. In the 2008 majles elections, conservatives gained further as the Guardian Council banned more than 1,700 reformist and independent candidates. Iranian voters responded with cynicism and apathy rather than unrest, fueling Khamenei’s complacent belief that principlists had prevailed over reformism and no serious challenge to his authority or agenda would arise.
In the run up to the election, the reformist movement quickly coalesced around Mousavi, with every major reformist organ and faction backing him except for Karroubi’s National Trust Party. Mousavi also welcomed the support of Rafsanjani, understanding that the reformists could not afford to alienate him and his constituency in order to erect the broadest tent possible. Over time, the Islamic Left’s economic outlook had become less explicitly statist. As a candidate, Mousavi backed neoliberal reforms and a strong role for markets, giving Ahmadinejad grounds to claim he was the true populist champion of the poor and working classes. Ahmadinejad also seized upon Rafsanjani’s support for Mousavi, alleging that Mousavi was tied to the powerful former president’s corruption.
Despite Khamenei’s personal animus toward him, Mousavi was not an overly liberal figure nor one who sought to replace the Islamic Republican regime. It, therefore, came as a shock that Mousavi became the locus for a groundswell of support by an Iranian youth that saw him as a vehicle for reinvigorating democratic aspirations and winning greater personal liberties. Mousavi’s appeal grew because of his plain-spokenness and his authentic lack of desire for power. His return from political exile had nothing to do with his ambitions. He saw Khamenei’s increasing usurpation of power and Ahmadinejad’s fiery extremism as leading Iran down the path to dictatorship and calamity. He believed strongly in the need for reforms to preserve the Islamic Revolution.
The 2009 presidential campaign was the most open in providing the electorate with competing visions for Iran’s future and the most acrimonious. Mousavi stated that Ahmadinejad’s rhetoric and agenda were "harmful to the Revolution, the country, and its good name," while Ahmadinejad accused Mousavi of adopting “Hitler’s methods” by repeating lies and accusations against his government and called for him to be jailed for insulting the president. Mousavi’s denunciations of Ahmadinejad and promises of reform, as well as a strong showing in the televised debate, galvanized enthusiastic support from the portions of the electorate that supported reformism or just opposed Ahmadinejad, and polling showed Mousavi gaining a strong edge, particularly in urban centers. If turnout was high, particularly in Tehran and other cities, victory seemed assured for Mousavi.
Mousavi’s ascension represented a nightmare scenario for Khamenei, and he set to work in tandem with the IRGC to place the thumb on the scales in Ahmadinejad’s favor. In late May, a confidential letter from Khamenei’s representative to the IRGC was made public, in which he advised the IRGC that Khamenei had been “clear” that Ahmadinejad should be reelected. Ahmadinejad had filled out the senior ranks of the Interior Ministry, the body tasked with administering the election and tallying the vote, with former IRGC officers and hardline loyalists. In the days leading up to the election, the basij were tasked with providing security at polling places. Ahmadinejad and IRGC commander Mohammad Ali Jafari warned that Mousavi’s supporters would likely try to foment unrest if they lost, and unprecedentedly large numbers of IRGC and basij security forces were dispatched to Tehran and other cities to maintain order.
The June 12, 2009, presidential election was marked by reports of turnout topping 80 percent, which boded well for Mousavi, and exit polls seemingly corroborated a strong showing. There were also reports of irregularities, such as basij voter intimidation, ballot stuffing, deceased voters casting ballots, and votes exceeding the pool of registered voters in provinces that were bastions of Ahmadinejad’s support. On election day, when it became apparent that turnout was extremely high, the regime shut down mobile phone and internet communications in Tehran. It used satellite jamming of news broadcasts to try and blunt Mousavi’s momentum and forestall a potential mass uprising ahead of the announcement of the preordained results. As the polls closed, regime security forces blockaded the Interior Ministry, a likely protest site, and warned that anyone approaching would be shot.
While the reformists had come to expect some cheating at the margins, the Interior Ministry defied credulity, announcing rapidly after the polls closed and before they could have tallied the vote that Ahmadinejad had won the election handily. The following day, the Interior Ministry announced their final tally was 62-33 percent in favor of Ahmadinejad, an improbably lopsided victory immediately triggered widespread condemnations of the apparently rigged contest. Outraged supporters of Mousavi immediately staged demonstrations. Mousavi demanded an investigation and denounced the results as a “dangerous charade” that would erode the Islamic Republic’s republicanism and usher in tyranny. Despite the obvious rigging and rapidly growing public anger, Khamenei immediately affirmed the election results as a “divine assessment,” warning that “enemies” would seek to stoke unrest by challenging the election’s legitimacy. Khamenei thereby set the precedent of declaring opposition to the election results as sedition, setting the stage for suppressing the emerging protest movement.