The polls have closed in Iran in a four-man presidential race that could reinvigorate efforts for an economic and diplomatic thaw with the West or end a four-year interlude in hard-line domination of the government.
The incumbent, relative moderate Hassan Rohani, and conservative former prosecutor Ebrahim Raisi, are the presidential front-runners in the clerically dominated Islamic country of around 81 million people, which faces high unemployment and economic problems at home and abroad.
Voting had been scheduled to run until 6 p.m. local time, but was extended three times because of a "rush of voters" that caused lines to form at polling booths in various parts of the country.
Voting was also held for Iranian citizens in dozens of countries around the world.
State television issued an official report saying people waiting in line were allowed to vote until midnight local time.
Mohammad Hashemi, the chief editor of state-run Press-TV's website, said in a tweet late on May 19 that more than 40 million votes had been cast and that turnout was about 72 percent.
Rohani, who oversaw a breakthrough nuclear deal with world powers to ease international sanctions, has promised engagement with the West and more freedom for Iranians.
"Our nation will announce on May 19 whether it continues on the path of peace or chooses the path of tension," the 68-year-old Rohani said in a recent campaign stop.
The 56-year-old Raisi is said to be trusted by the country's most senior figure, Supreme Leader Ayatollah Ali Khamenei, who as the holder of ultimate political, military, and religious power in Iran can easily derail a campaign or thwart the plans of a president. Raisi's name has also come up as a possible successor to the 77-year-old Khamenei.
Raisi has echoed Khamenei's and other hard-liners' calls for self-sufficiency to improve the economy, and he has accused Rohani of projecting weakness to the world.
WATCH: Hassan Rohani and Ebrahim Raisi Cast Ballots In Iranian Presidential Election (natural sound)
Raisi has described the voters' choice as one between "inefficiency" and "efficiency."
A veteran of the powerful Judiciary, Raisi has alleged that Rohani has significantly worsened inequalities in Iranian society.
"Why have you increased the gap between the poor and rich so much with your misguided policies?" Raisi said in a May 16 speech in the Iranian capital. He accused Rohani of overreliance on foreign investment to fix economic problems.
An independent poll showed Rohani nearly 20 points ahead of Raisi on the eve of the vote, although polling is notoriously unreliable in Iran and many voters reportedly remained undecided.
Two of the original six approved candidates dropped out of the race days before the election, and the two others that remain -- conservative Mostafa Mirsalim, a former culture minister, and centrist Mostafa Hashemitaba, a former head of the Iranian National Olympic Committee -- are regarded as distant outsiders.
Khamenei cast his vote in Tehran shortly after polls opened and called on Iranians to turn out in huge numbers.
"Everyone should vote in this important election," he said, adding that "the destiny of the country is in the hands of Iranians."
After casting his ballot in the capital, Rohani said that whoever is elected as president should be supported by the entire nation.
"Any candidate who is elected should be helped to accomplish this heavy responsibility," he said. "Anyone who is elected must be helped from tomorrow with unity, happiness, and joy."
Raisi told journalists that everyone should "completely surrender to the result of the election."
"If I, for instance, find the result undesirable, it should not lead to disruption of the election," he said after voting.
Long Lines At Polling Stations
State television showed long queues outside polling stations in several cities.
A man in an affluent Tehran neighborhood told RFE/RL that he had waited for about two hours to cast his ballot.
"When I left the line was even longer," the man, who did not want to be identified, said via the messaging app Telegram.
Also speaking via Telegram, a woman said that that voters at a polling station in a mosque in the capital were urging each other to vote for Rohani.
"It was very crowded. There was a feeling of hope but also fear," said the woman, who did not want to be named.
Analysts suggested a big turnout could benefit Rohani, as high participation in the past has led to the election of reformist or moderate candidates.
"In a high turnout, [as] we have seen in the past elections, it is people who want to have a more moderate person in power who vote," Washington-based analyst Rasool Nafisi told RFE/RL.
Karim Sadjadpour, a senior analyst with the Carnegie Endowment for International Peace, says Rohani and Raisi must try and appeal to two competing constituencies -- young Iranians who compose more than half of the population and yearn for freedom and interaction with the world, and hard-core regime supporters who staunchly oppose opening up the country to outside influence.
He characterized those segments as "a young, modern Iranian population eager for change, and an entrenched, dogmatic military and clerical establishment eager to crush change."
"Raisi is the enthusiastic candidate of the latter, while Rohani is the default candidate of the former," he said.
The election is the first since the landmark nuclear deal in 2015 that resulted in significant limits on Tehran’s most sensitive nuclear activities -- which many in the West believed were part of an effort to build atomic weapons -- in exchange for sanctions relief.
Rohani has managed to slash inflation from official figures of about 30 percent to 9 percent and spur economic growth. But unemployment remains at an estimated 12 percent, with the rate among young people closer to 30 percent.
Economy Could Be Decisive Issue
A poll issued in April suggested that the economy is the key issue for many voters, who are frustrated at the slow pace of economic recovery since the nuclear accord.
Raisi has tapped into that frustration to attack Rohani for failing to translate the deal into better living standards for average Iranians.
Rohani has accused Raisi, who has promised to triple cash handouts to the poor and create up to 4 million jobs, of making unrealistic promises and deceiving voters.
Rohani has been blunt in references to the past of Raisi, a former member of the so-called death commissions involved in the summary executions of thousands of political prisoners in the 1980s.
Speaking on May 8, Rohani said voters did not want someone who in the four decades since Iran's 1979 revolution has only known how to "execute and jail," adding that the era of extremists is over.
Raisi has countered by saying Rohani tries to cover up his failures by creating fear among Iranians.
"He says things such as 'they want to create a wall' [to separate men and women]," Raisi said, then added in an allusion to wayward officials. "I say we will create a tall wall to [counter] the plunderers of the rights of the people."
Former reformist President Mohammad Khatami and three main opposition figures who remain under house arrest have endorsed Rohani. He has called on voters to give him another four years to achieve all his promises, including rebuilding an economy that has suffered under sanctions and mismanagement.
Raising The Stakes?
Talk of Raisi as a possible successor to Supreme Leader Khamenei could raise the stakes in Iran's carefully vetted election just eight years after a presidential vote sparked the biggest street protests in Iran since iconic student demonstrations in 1999.
Raisi is believed to enjoy broad support within the hard-line Islamic Revolutionary Guards Corps (IRGC) military organization.
Ali Vaez, a senior Iran analyst with the International Crisis Group (ICG), says Raisi faces an uphill battle in part because of a perceived lack of executive experience and even charisma.
"His defeat would be a double edged sword for his ambition to succeed the current supreme leader: the election would raise his profile and broaden his support base, but it would be a setback -- albeit not a fatal one, as popularity is not the most determining factor for ascending to the pinnacle of power in the Islamic republic," Vaez told RFE/RL via e-mail.
Rohani's supporters are warning that the future of their country is at stake and say they don't want to end up embroiled in conflict like some of their Middle Eastern neighbors.
"If you want [Iran to become] Syria or Iraq, vote for Raisi. If you want peace, security, and freedom, vote for Rohani," a listener told RFE/RL’s Radio Farda.
But Raisi supporters argue that theirs is a better choice for the country.
Raisi heads one of Iran's wealthiest charities, the Astan Qods Razavi charity that oversees the majority-Shi'ite country's holiest shrine, but has never held elected office.
"He is an efficient manager and also because he is mindful of the weak and deprived classes of the society," another Iranian said, "a class that is being crushed under economic problems."
There are no high-profile calls for a boycott, but some Iranians vowed not to vote, citing the undemocratic nature of a system in which potential candidates are vetted by the hard-line Guardians Council.
“I won’t participate in this show,” a 42-year-old woman said via Instagram from the Iranian capital.
About 55 million people were eligible to vote -- the voting age is 18.
Ballot counting was due to start at midnight and final results are expected within 24 hours of the closure of polls, state television reported.
If no candidate wins more than 50 percent of the votes, the top two candidates will compete in a runoff on May 26.