Presidential elections were held in Iran 17 June 2005, with a second round run-off on 24 June. Mohammad Khatami, the outgoing president of Iran, stepped down on 2 August 2005, after serving his maximum two consecutive four-year terms according to the Islamic republic's constitution.

As no candidate received a majority of the vote in the first round, a run-off was held between the top two candidates, former president (1989–1997) Akbar Rafsanjanī and Mahmoud Ahmadinejad, the hardline mayor of Tehran. Although Ahmadinejad had finished second in the first round of voting, he won the second round with 63% of the vote. Factors thought to have contributed to Ahmadinejad's victory include mobilization of mosque networks and conservative/hardline voters, and a protest vote against corrupt elite insiders and for "new political blood".Wright, Robin, Dreams and Shadows : the Future of the Middle East, Penguin Press, 2008, p. 317–8 He was a loyal supporter of conservative Supreme Leader Khamenei.

Schedule Schedule of the election had been decided between the Ministry of Interior and the Guardian Council for 17 June 2005. The election will continue as a runoff race, which will take place a week later than the first round of elections, on 24 June 2005. The registration of candidates began on 10 May 2005 and continued for five days, until 14 May. If the Guardian Council had requested, it may have been extended for five more days, until 19 May. The candidates were not allowed to do advertisements, until the final list of approved candidates are known. The official period for advertisement was from 27 May to 15 June.

In the first round, Iranian nationals born on or before 17 June 1990, residing in or outside Iran, were able to vote. The election in Iran began on 09:00 local time (04:30 UTC) and while the original deadline was ten hours later on 19:00 (14:30 UTC), the deadline was extended three times by the Ministry of Interior, finally until 23:00 (18:30 UTC). Outside Iran, different times are used as the opening and closing hours for the polling offices. On the same date, mid-term Majlis elections for Gachsaran, Garmsar, Ghazvin, Ilam, Iranshahr, Jolfa, Marand, Sarbaz, and Shiraz took place together with the runoff elections of Tehran for the Iranian Majlis election of 2004.

The first three suggestions by the Ministry, for 13 May, 20 May and 10 June 2005, had been rejected by the council. The Ministry had mentioned that it is concerned that an election later than 20 May may collide with the final exams of the elementary schools and high schools.

The second round of the election occurred on 24 June and Iranian nationals born on or before 24 June 1990 were able to vote. The election in Iran began at 09:00 local time (04:30 UTC) and the closing time of the voting polls was at 19:00 (14:30 UTC), but was subject to extension by the Ministry of Interior.

Candidates The registration of the candidates finished on 14 May 2005 and 1014 candidates had registered to run, including many people who did not have the qualifications required in the law. More than 90% of the candidates were men, and there were about ninety female candidates. The law about the election process does not include any requirements for people who want to register to run: it only provides qualifications that are to be checked by the Guardian Council.

The candidates must have first be approved by the Guardian Council before being put to public vote and it could be predicted that some of the candidates would not win the approval, especially Ebrahim Asgharzadeh and Ebrahim Yazdi, who were rejected by the Council in the parliamentary elections of 2004 and/or the presidential elections of 2001. There were also some people who expected Mostafa Moeen, the most controversial reformist candidate, to be disqualified as well. But the most unpredictable was the disqualification of conservative Reza Zavare'i, a former member of the Guardian Council and an approved presidential candidate for two previous elections.

Also, there was a high probability of rejection of women, because of an ambiguous term ("rejāl", رجال) in the Constitution of Iran, a requirement for presidential candidates, which may be interpreted as either "men" or "nobles". The Guardian Council, who is also the official interpreter of the constitution, has mentioned on previous elections that the restriction has not been considered in depth yet, since according to the council's opinion there were no women registered to run for presidency who fulfilled the other requirements of the constitution; but still, the Council believes that the requirement of rejal would not match women.

There had also been discussions for a new law proposed in the Majlis, restricting the maximum age of the candidates for the presidential elections. This was widely seen as an attempt to limit the participation of Akbar Rafsanjanī and Mehdi Karroubi. The attempt failed with no proposal appearing.

Approved candidates The list of all the people who have officially registered to run for the post is not available to the public, but the Guardian Council published a final list of six approved candidates on 22 May rejecting all independent candidates and some candidates from the both wings, specially the reformist candidates Mostafa Moeen and Mohsen Mehralizadeh. This raised many objections among the general public and the political parties, including student protests in the Tehran University, among other universities. This, and the objections of some of the approved candidates, led to a letter from Ayatollah Khamenei, the Supreme Leader, to the Guardian Council asking for the approval of Moeen and Mehralizadeh (this had apparently been because of a request by Haddad-Adel, the conservative Speaker of the Parliament). It is unknown if that letter meant that the Guardian Council must have approved these two, or it should have only reconsidered their case. The next day, on 23 May, the Guardian Council announced the approval of Moeen and Mehralizadeh.

Mohsen Rezaee, one of the approved conservative candidates, who is the Secretary of Expediency Discernment Council and a previous commander of the Iran–Iraq War, withdrew in the evening of 15 June.

These were the candidates approved by the Council of Guardians:

Trans-party Akbar Rafsanjanī, Chairman of the Expediency Discernment Council and a former President of Iran, who won the support of several parties from both of the wings, but was considered to lean towards the conservatives more than towards the reformists. Ironically, the reformist alliance considered him as a possible candidate of theirs more than the conservative alliance. He was invited to run for president by Executives of Construction Party (reformist), Combatant Clergy Association (conservative), Islamic Labour Party (conservative), and Workers' House (reformist), as well as several other parties across the whole spectrum of positions. Rafsanjani confirmed he is running for the election on 10 May after much speculation.

Reformists Mehdi Karroubi, former Majlis Speaker, Secretary General of Association of Combatant Clerics (MCS), supported by MCS, Islamic Association of Engineers, Majma'-e Gorooh-haa-ye Khat-te Emam, and Democracy Party of Iran. Mohsen Mehralizadeh, vice-president and head of National Sports Organization, member of IIPF. Mehralizadeh has first announced that he would be running for the post on behalf of the Iranian younger generation, but not if the reformist alliance reached consensus on another candidate, but during the registration mentioned that he would remain in the race until the end. Mostafa Moeen, former Minister of Science, Research and Technology, supported by Islamic Iran Participation Front (IIPF) and Mojahedin of the Islamic Revolution Organization (MIRO). Confirmed to run on 29 December 2004. IIPF, an influential reformist party in Iran, has mentioned that they won't support any presidential candidate outside the party, except Mousavi and Moeen. Since Mousavi has declined to run, they supported Moeen, whom they claimed to be the most probable candidate to win the approval of other parties in the reformist alliance. Some conservative Majlis representatives had asked for the Guardian Council's rejection of Moeen, which happened finally but was reversed after a letter by Ayatollah Khamenei. Moeen had announced that he would choose Mohammad Reza Khatami as his First Vice President if he was elected, and had already chosen Elaheh Koulaee, a female representative of the sixth Islamic Assembly, as his spokeswoman.

Conservatives Mahmoud Ahmadinejad, Mayor of Tehran, member of Islamic Society of Engineers (ISE), supported by some parts of Alliance of Builders of Islamic Iran (ABII). Although Ahmadinejad said he would not seek nomination on 2 February 2005, he returned to the scene later. Mohammad Bagher Ghalibaf, former Commander of Police (niroo-ye entezaami), partially supported by the Alliance of Builders. Contrary to the public announcement of Ayatollah Khamenei, the Supreme Leader of Iran, that nobody knows who he will personally vote for, Ghalibaf had claimed privately that he is the person Khamenei will vote for. Ali Larijani, Supreme Leader's representative in National Security Council and a former director of IRIB, who was supposed to be the major conservative candidate, as chosen by his party, the Islamic Society of Engineers, as well as the "Council for Coordinating the Revolution Forces" (showrā-ye hamāhangi-e nirūhā-ye enǧelāb), a council of some older and very influential leaders of the conservative alliance.

Rejected candidates Reformists Akbar A'lami, Majlis representative of Tabriz. Ebrahim Asgharzadeh, former member of Tehran city council, Secretary General of Islamic Iran Solidarity Party (Hezb-e Hambastegi-e Irān-e Eslāmi), and one of the hostage-takers in Iran hostage crisis. Asgharzadeh was even not supported by his own party (Islamic Iran Solidarity Party). Asgharzadeh was rejected by the Guardian Council to run as a candidate in the 2001 presidential elections, which had made him unlikely to be approved this time. Mostafa Kavakebian, secretary-general of Democracy Party (hezb-e mardomsālāri). Kavakebian supported Karroubi after he himself was rejected. Conservatives Zabihollah Bakhshi, commonly known as Haji Bakhshi, militia leader Rafat Bayat, Majlis representative from Zanjan, a member of conservative caucus in parliament. On 30 March, she stated that she would run independently, not supported by any significant party in the conservative alliance. It was assumed by some people that she would probably get rejected by the Guardian Council, because of the rejāl requirement (see above). Reza Zavare'i, former member of Guardian Council, invited to run by Chekaad-e Daaneshjooyaan-e Mosalmaan Independents Nasser Hejazi, former goalkeeper of the national football team and former coach of the Esteghlal football club. After his rejection, Hejazi supported Rafsanjanī as president. Mohammad Hossein Pahlevan, known as Arshia, pop singer Azam Taleghani, daughter of Ayatollah Mahmoud Taleghani. Ebrahim Yazdi, former Minister of Foreign affairs in the Interim Government of 1979, secretary general of Freedom Movement Party. After being rejected by the Guardian Council, Yazdi is supporting Moeen for the presidency. Unknown affiliation Ayatollah Mohammad Sajjadi

Declinations and withdrawals The most important withdrawal was that of Mohsen Rezaee, one of the candidates who was approved by the Guardian Council and participated in the race until the evening of 15 June 2005, two days before the election and only a few hours before the final deadline allowed for advertisements. Rezaee mentioned he was withdrawing from the race for "the integration of the votes of the nation" and "their effectiveness". He did not endorse any candidate.