In June 2005, Iranians went to the polls in what proved to be the most intensely contested of the nine presidential elections that the Islamic Republic has held since 1980. The 2005 vote was also the first to go to a runoff, as the June 17 first round ended with no candidate having surpassed the 50 percent threshold needed for an outright victory. In the June 24 second round, Tehran mayor Mahmoud Ahmedinejad was elected president with 62 percent of the vote against former president Ali Akbar Hashemi Rafsanjani. The official turnout reported for both rounds was around 60 percent, which is relatively highfor Iran, albeit far below the highwater-mark 83 percent turnout that was recorded during the presidential balloting of 1997. The election marked the second transfer of the presidential office from one occupant to another since the 1989 death of Ayatollah Ruhollah Khomeini, the founder of the Islamic Republic.