Iran's presidential election Friday is effectively a choice between moderate incumbent Hassan Rouhani and hardline jurist Ebrahim Raisi, with major implications for everything from civil rights to relations with Washington.
Rouhani is still seen as the front-runner, but he faces a tougher than expected challenge from Raisi, who has rallied religious traditionalists and working-class voters disillusioned with the stagnant economy.
This is the issue driving the campaign on all sides as the Islamic republic struggles with 12.5% unemployment and minimal growth outside the oil sector.
Rouhani won praise for taming inflation and easing sanctions through a nuclear deal with world powers, but his promises of massive foreign investment have not materialised.
"Rouhani stemmed the decline, but he overdid the austerity," said Djavad Salehi-Isfahani, an economics professor at Virginia Tech in the US.
Raisi has pushed his charitable credentials as head of the powerful Imam Reza foundation and vowed more support for the poor.
Voting has begun in Iran's presidential election https://t.co/adAxNGlnC0@youseftv has the latest from Tehran: pic.twitter.com/tXDLpvjVoU — Bloomberg Politics (@bpolitics) May 19, 2017
Because it had the tacit approval of supreme leader Ayatollah Ali Khamenei, Raisi supports the 2015 deal with world powers, which saw curbs to Iran's nuclear programme in return for an easing of sanctions.
"The nuclear issue is not decided by the president and the future of the deal will depend on the Trump administration which is trying to change Iran's behaviour with the threat of force," said Thermes.
But Raisi has attacked the Rouhani government for his "weak" stance during negotiations and for having failed to cash in on the deal.
"We should not show any weakness in the face of the enemy," he said in a televised debate, raising the possibility that he could deepen already worsening tensions with Washington.
Rouhani has framed the vote as a choice between more civil liberties and "extremism".
This was key to his 2013 victory, but he has struggled in the past four years to make headway against Iran's conservative-dominated judiciary and security services.
Raisi has tried to present a relatively liberal image, but his gender-segregated rallies are in stark contrast to the mixed and liberal-minded crowds turning out for Rouhani, who has been endorsed by leading reformists and celebrities such as Oscar-winning director Asghar Farhadi.
The government says it needs $50 billion a year in foreign capital to get the economy moving, but investors and global banks remain nervous about remaining US sanctions and Iran's shady financial system.
Meanwhile, Iran's supreme leader has called for a self-sufficient "resistance economy", a point emphasised by Raisi.
But in a country heavily dependent on oil exports, total independence is not realistic.
"No one is taking the 'resistance economy' idea to the extreme of Venezuela-style efforts to control prices and markets. Everyone sees some room for trade," said Salehi-Isfahani.
Iran has a far higher election turnout than the United States. Here's what's most surprising about the country's presidential elections. pic.twitter.com/sHqFbJxEAF— AJ+ (@ajplus) May 19, 2017