Reformist candidate Masoud Pezeshkian has won Iran’s run-off presidential election.

He beat hard-liner Saeed Jalili after promising to reach out to the West and ease enforcement on the country’s mandatory headscarf law after years of sanctions and protests squeezing the Islamic Republic.

Mr Pezeshkian promised no radical changes to Iran’s Shiite theocracy in his campaign and long has held Supreme Leader Ayatollah Ali Khamenei as the final arbiter of all matters of state in the country.

But even his modest aims will be challenged by an Iranian government still largely held by hard-liners, the ongoing Israel-Hamas war in the Gaza Strip and Western fears over Tehran enriching uranium to near-weapons-grade levels.

Iran Election
Candidate for the Iran’s presidential election Saeed Jalili, a hard-line former nuclear negotiator, casts his vote for the presidential run-off (AP Photo)

A vote count offered by authorities put Mr Pezeshkian as the winner with 16.3 million votes to Mr Jalili’s 13.5 million in Friday’s election.

“Dear people of Iran, the elections are over and this is just the beginning of our cooperation,” he wrote on social media platform X, which is still banned in Iran.

“The difficult path ahead will not be smooth except with your companionship, empathy and trust. I extend my hand to you and I swear on my honor that I will not leave you alone on this path. Do not leave me alone.”

Supporters of Mr Pezeshkian, a heart surgeon and long-time politician, entered the streets of Tehran and other cities before dawn to celebrate as his lead grew over Mr Jalili, a hard-line former nuclear negotiator.

His win at a delicate moment with tensions high over the Israel-Hamas war in the Gaza Strip, Iran’s advancing nuclear programme and a looming US election that could put any chance of a detente between Tehran and Washington at risk.

The first round of voting on June 28 saw the lowest turnout in the history of the Islamic Republic since the 1979 Islamic Revolution.

Iranian officials have long pointed to turnout as a sign of support for the country’s Shiite theocracy, which has been under strain after years of sanctions crushing Iran’s economy, mass demonstrations and intense crackdowns on all dissent.

Government officials up to Supreme Leader Ayatollah Ali Khamenei predicted a higher participation rate as voting got underway, with state television airing images of modest lines at some polling centres across the country.

Iran Election
Election officials count ballots for the presidential election at a polling station in Tehran, Iran (Vahid Salemi/AP)

Online videos purported to show some polls empty while a survey of several dozen sites in the capital Tehran saw light traffic amid a heavy security presence on the streets.

The vote comes amid heightened regional tensions. In April, Iran launched its first direct attack on Israel over the war in Gaza, while militia groups that Tehran arms in the region — such as the Lebanese Hezbollah and Yemen’s Houthi rebels — are engaged in the fighting and have escalated their attacks.

Iran is also enriching uranium at near weapons-grade levels and maintains a stockpile large enough to build several nuclear weapons, should it choose to do so. And while Khamenei remains the final decision-maker on matters of state, whichever man ends up winning the presidency could bend the country’s foreign policy toward either confrontation or collaboration with the West.

The campaign also repeatedly touched on what would happen if former US president Donald Trump, who unilaterally withdrew America from the Iran nuclear deal in 2018, won the November election.

Iran has held indirect talks with President Joe Biden’s administration, although there has been no clear movement back toward constraining Tehran’s nuclear programme for the lifting of economic sanctions.

More than 61 million Iranians over the age of 18 were eligible to vote, with about 18 million of them between 18 and 30. Voting was to end at 6pm but was extended until midnight to boost participation.

The late president Ebrahim Raisi, who died in a May helicopter crash, was seen as a protege of Ayatollah Khamenei and a potential successor as supreme leader.