Q&A: Iran's 2013 elections
Iranians have voted to elect a new president in a contest devoid of opposition candidates.
Eight contenders made it through a rigorous vetting process that eliminated 678 hopefuls, although two subsequently dropped out.
There are no political parties in the conventional sense, but the six candidates identify with broad movements in the Iranian political system.
Four are conservatives who profess absolute loyalty to the Supreme Leader, Ayatollah Ali Khamenei.
Did President Ahmadinejad stand again?
President Mahmoud Ahmadinejad had already served his maximum two consecutive terms, and so could not stand this year. His win in the controversial 2009 presidential election was endorsed by Ayatollah Khamenei after mass protests were crushed with great violence, but the two have fallen out publicly in the ensuing four years.
This time round Mr Ahmadinejad's protege Esfandiar Rahim Mashaei failed to get through vetting.
The Khamenei group dub them a "deviant current" that prizes Iranian nationalism over "pure Islam", so the contest will be between ultra-loyalists and moderate reformers.
Who are the candidates?
The most prominent pro-Khamenei candidate was Saeed Jalili, the secretary of the National Security Council and Iran's chief negotiator in the continuing stand-off with the United Nations and the West over its nuclear programme.
Also standing from this camp was Mohammad Baqer Qalibaf, the energetic mayor of Tehran, Ali Akbar Velayati, a veteran Khamenei aide, and Mohsen Rezai, a former commander of the Revolutionary Guards who has been on Interpol's wanted list since 2007 over the bombing of a Jewish centre in Buenos Aires in 1994.
The reform candidates were former Vice-President Mohammad Reza Aref who withdrew to support former nuclear negotiator Hassan Rouhani - the only cleric in the race - and Mohammad Gharazi, a low-profile ex-minister who campaigned on a "no-inflation" programme.
Who didn't make it through the vetting process?
The vetting process is meant to "prevent corruption and deviation", according to one jurist. Presidential hopefuls must pass an initial assessment by the Election Board, which checks them against police, court and registry records for piety and loyalty to the Islamic Republic.
Then they move on to the Guardian Council of 12 Muslim clergymen and jurists, which is appointed by the supreme leader and parliament.
Critics see the council as a method of handpicking loyal candidates. The most obvious victims of the process this time round were supporters of President Ahmadinejad and any high-profile reformers with a real chance of winning the election.
The two reform candidates from the 2009 election - Mir Hossein Mousavi and Mehdi Karroubi - have been under house arrest since contesting the results of that poll, and former President Mohammad Khatami declined to stand.
The disqualification of former president Akbar Hashemi Rafsanjani in May finally left supporters of the post-2009 liberal Green Movement divided about whether to bother voting in the election at all.
What were the main election issues?
The question that most concerned voters was the dire state of the economy, hard-hit by years of sanctions over Iran's nuclear programme.
All candidates promised to improve the economy and condemned President Ahmadinejad's stewardship, with the hardliners emphasising internal solutions like improving management, increasing privatisation and fighting corruption.
The reformers talked cautiously about improving relations with the rest of the world, although Mohammad Reza Aref was more forthright in condemning the hold that vested interests like the Revolutionary Guards have over sectors of the economy.
No candidate questioned the wisdom of the nuclear programme, the reason for the crippling sanctions.
How does the election work?
If no candidate wins more than 50% of the vote in the first round, a run-off will be held on 21 June between the top two candidates.
The supreme leader will ratify the vote on 3 August before the new president takes the oath in parliament. This emphasises the fact that the president is subordinate to the supreme leader in all matters.
Was the media coverage fair?
The election law allowed all candidates equal access to state broadcast media, and the live television debates featured them all.
But this came against a background of a relentless crackdown on freedom of expression since the 2009 election, which was stepped up in early 2013.
Many reform newspapers have been shut down, access to the internet and foreign broadcasters has been restricted, and journalists have been detained.
The social media are full of candid debate, but their influence outside the major cities is debatable.