Iranians began voting on Friday in a presidential election likely to be won by a judge fiercely loyal to the religious establishment, although many people are expected to ignore the vote due to discontent with economic hardship and hardline rule.
With uncertainty surrounding Iran's efforts to revive its 2015 nuclear deal and growing poverty at home after years of U.S. sanctions, the turnout for the vote is being seen by Iranian analysts as a referendum on the leadership's handling of an array of crises.
"Each vote counts ... come and vote and choose your president ... this is important for the future of your country," said Supreme Leader Ayatollah Ali Khamenei after casting his vote in the capital, Tehran.
State television showed long queues outside polling stations in several cities. More than 59 million Iranians are eligible to vote. Polls will close at 1930 GMT but can be extended for two hours. The results are expected around midday on Saturday.
Hardliner Ebrahim Raisi, 60, a close ally of Khamenei, is favourite to succeed the incumbent Hassan Rouhani, forbidden under the constitution from serving a third four-year term.
A win for the Shi'ite cleric would confirm the political demise of pragmatist politicians like Rouhani, weakened by the U.S. decision to quit the nuclear deal and reimpose sanctions in a move that stifled rapprochement with the West.
But it would not disrupt Iran's bid to revive the agreement and break free of tough oil and financial sanctions, Iranian officials say, with the country's ruling clerics aware their political fortunes rely on tackling worsening economic hardship.
"Raisi's main challenge will be the economy. Eruption of protests will be inevitable if he fails to heal the nation's economic pain," a government official said.
Official opinion polls suggest turnout could be as low as 44%, significantly lower than in past elections.
Under pressure over rising inflation and joblessness, the clerical leadership needs a high vote count to boost its legitimacy, damaged after a series of protests against poverty and political restrictions across Iran since 2017.
Raisi's main rival is a pragmatist technocrat, former central bank governor Abdolnaser Hemmati, who says a win for any hardliner will result in yet more sanctions imposed by outside powers. Iran could hold talks with longtime arch-foe the United States if it adhered to "positive coexistence" with Iran, he said in the election campaign.
Raisi has crucial backing from Iran's Revolutionary Guards Corps, a powerful institution which over the years has opposed reformist initiatives, overseen the suppression of protests and used proxy forces to assert Iran's regional influence.
The mid-ranking cleric says he backs Iran's talks with six major powers to revive the nuclear deal, under which Iran agreed to curbs on its nuclear programme in return for the lifting of sanctions.
But Raisi, who shares Khamenei's suspicion of detente with the West, says only a powerful government can implement any revival of the pact.
Accused by critics of human rights abuses stretching back decades - allegations his defenders deny - Raisi was appointed by Khamenei to the high-profile job of judiciary chief in 2019.
A few months later, the United States sanctioned him for human rights violations, including the executions of political prisoners in 1980s and the suppression of unrest in 2009, events in which he played a part, according to human rights groups.
"If elected, Raisi will be the first Iranian president in recent memory to have not only been sanctioned before he has taken office, but potentially sanctioned while being in office," said analyst Jason Brodsky.
Iran has never acknowledged the mass executions, and Raisi himself has never publicly addressed allegations about his role.