Iranians go to the polls on Friday to vote in the presidential election.
The high-stakes contest takes place in an increasingly polarised atmosphere, with the electorate split between those pushing for greater reforms and conservatives wanting to reinforce Islamic values.
It comes two years after Tehran signed a landmark nuclear accord with six world powers and as US president Donald Trump puts increasing pressure on the Islamic republic.
Here, the FT takes a look at the issues.
Who are the contenders?
Although there are four presidential candidates, the contest is effectively a two-horse race between Hassan Rouhani, the pragmatic president who is seeking a second term, and Ebrahim Raisi, a senior cleric and former prosecutor-general who is running for political office for the first time.
There are no political parties in Iran, but the camps are divided between pro-reform groups who back Mr Rouhani and regime hardliners supporting Mr Raisi.
Mr Rouhani, whose backers include former president Mohammad Khatami, is relying on a strong turnout from the middle class. Mr Raisi, who is believed to enjoy the support of the elite Revolutionary Guards and conservative clergy, has courted pious and poorer voters.
What are the main policy differences?
The election is widely seen as a referendum on the direction the Islamic republic will take a year after the nuclear accord was implemented and many sanctions on the country lifted.
Will Iran continue its tentative opening to the outside world and further ease social and political restrictions at home, or will it revert to more hostile foreign relations and greater domestic suppression?
Mr Rouhani has promised to defend social and political freedoms and give Iranians greater access to the internet and social media. He also hopes to use the nuclear deal to attract more foreign investment and improve Iran’s relations with other countries after years of isolation.
His economic policy is focused on keeping inflation in single-digits, reforming the troubled banking sector, and reducing Iran’s reliance on petrodollars by improving tax collection and generating jobs by supporting export-oriented companies.
Mr Raisi has campaigned on a populist platform, promising to triple monthly state subsidies and provide cheap housing for the poor. He has pledged to create a government of “work and dignity”, but has revealed scant details about his plans.
That has fuelled fears among Iran’s pro-reform middle class that a Raisi presidency would mean a return to the policies of former president Mahmoud Ahmadi-Nejad, whose two terms in office were characterised by hostile relations with the west, sanctions, recession and high inflation.
How will the outcome affect Iran’s foreign relations?
Iran’s foreign policy is largely determined by Ayatollah Ali Khamenei, the supreme leader and ultimate decision maker. But the president has an impact on the balance of power within the regime and can play an important role influencing policies.
During Mr Rouhani’s first term, Iran shed its pariah status by signing the nuclear deal, and during the campaign the president said he would work to get remaining sanctions removed.
He has not commented publicly about how he plans to deal with the US since the election of Mr Trump, who announced earlier this year that his administration had put Iran “on notice” following a missile test.
Under Mr Rouhani, Tehran has responded cautiously to the US president’s rhetoric, suggesting that the regime wants to avoid provoking Washington.
The incumbent has criticised Mr Raisi for having no experience in international affairs, warning voters that a hardline presidency would increase the risk of new sanctions being imposed and raise the potential for military confrontation.
Mr Raisi has avoided talking about foreign policy throughout the campaign. His core supporters in the Revolutionary Guards and hardline clerical circles typically expect radical rhetoric against the US and Israel at political rallies.
But Mr Raisi is conscious that employing such slogans would risk scaring voters who want less confrontational foreign relations, say analysts.
When Mr Rouhani accused him of having no clue about foreign policy during a television debate, Mr Raisi responded by saying that when he served in senior judicial posts he always held meetings with foreign dignitaries.
Will the results have any impact on the nuclear deal?
Both candidates have said they are committed to the accord, which Tehran signed with the US, the UK, Russia, China, Germany and France in 2015.
But Mr Rouhani, who considers the pact his signature achievement, has warned it could be put at risk if he is not re-elected.
He has said the support of the supreme leader was essential to sealing the deal, but also implied it would not have been possible if he were not president. Mr Rouhani, Iran’s chief nuclear negotiator in the early 2000s, has also challenged Mr Raisi to clarify how he would safeguard the accord.
Despite pledging to implement the agreement, Mr Raisi has also said that Tehran negotiated bad terms and was humiliated by the US during talks.
Is this a free and fair election?
The contenders have been scrutinised by the Guardian Council, the constitutional watchdog that determines who is qualified to run, to verify their commitment to the principles of the constitution and their loyalty to the supreme leader.
Candidates are allowed to have a representative at polling stations. No political group has raised concerns about the possibility of stuffing ballot boxes in this election, but Mr Rouhani has alleged that his rival has used public money to bus people to rallies and buy gifts for poorer voters. Mr Raisi’s supporters have laughed off the allegations.
Mr Khamenei, who considers a high turnout as important to endorse the Islamic republic’s popular legitimacy, on Wednesday urged authorities to safeguard people’s votes. That was seen as an attempt to reassure those reluctant to vote that there will be no attempt to sabotage the process.
But memories of the 2009 vote, when reformists alleged that the election was stolen, triggering mass demonstrations across the country, remain fresh in many people’s minds.
More on Iran’s election
1. Roula Khalaf Iran’s election is one Vladimir Putin does not want to meddle in
2. FT View Iran’s choice lies between hope and vested interests
3. News analysis Iran’s divided electorate unites behind foreign policy stance