Ultraconservative cleric Ebrahim Raisi was declared the winner of Iran's presidential election, a widely anticipated result after many political heavyweights were barred from running.

Mr Raisi won 62% of the vote with about 90% of ballots counted from yesterday's election, poll officials said, without releasing turnout figures, after the three other candidates had conceded defeat.

"I congratulate the people on their choice," said outgoing moderate President Hassan Rouhani without naming Mr Raisi. "My official congratulations will come later, but we know who got enough votes in this election and who is elected today by the people."

The other two ultraconservative candidates - Mohsen Rezai and Amirhossein Qazizadeh Hashemi - explicitly congratulated Mr Raisi, as did the only reformist in the race, former central bank governor Abdolnasser Hemmati.

Mr Raisi, 60, takes over from Mr Rouhani in August as Iran seeks to salvage its tattered nuclear deal with major powers and free itself from punishing US sanctions that have driven a sharp economic downturn.

Mr Raisi, the head of the judiciary whose black turban signifies direct descent from Islam's Prophet Mohammed, is seen as close to the 81-year-old supreme leader, Ayatollah Ali Khamenei, who has ultimate political power in Iran.

Many voters chose to stay away after the field of 600 hopefuls including 40 women had been winnowed down to seven candidates, all men, excluding an ex-president and a former parliament speaker.

Three of the vetted candidates dropped out of the race two days before yesterday's election, and two of them quickly threw their support behind Mr Raisi.

Populist former president Mahmoud Ahmadinejad, one of those who were barred from running by the Guardian Council of clerics and jurists, said he would not vote, declaring in a video message that "I do not want to have a part in this sin".

Mr Raisi has promised to fight corruption, help the poor and build millions of flats for low-income families, and holds deeply conservative views on many social issues including the role of women in public life.

To opposition and human rights groups, his name is linked to the mass execution of political prisoners in 1988.

The US government has sanctioned him over the purge, in which Mr Raisi has denied playing a part.

Ultimate power in Iran, since its 1979 revolution toppled the US-backed monarchy, rests with the supreme leader, but the president wields major influence in areas from industrial policy to foreign affairs.

Mr Rouhani, 72, leaves office in August after serving the maximum two consecutive four-year-terms allowed under the constitution.

His landmark achievement was the 2015 deal with world powers under which Iran agreed to limit its nuclear programme in return for sanctions relief.

But high hopes for greater prosperity were crushed in 2018 when then-US president Donald Trump withdrew from the accord and launched a "maximum pressure" campaign against Iran.

While Iran has always denied seeking a nuclear weapon, Mr Trump charged it was still planning to build the bomb and destabilising the Middle East through proxy groups in Iraq, Lebanon, Syria and Yemen.

As old and new US sanctions hit Iran, trade dried up and foreign companies bolted. The economy nosedived and spiralling prices fuelled repeated bouts of social unrest which were put down by security forces.

Iran's ultraconservative camp - which deeply distrusts the United States, labelled the "Great Satan" or the "Global Arrogance" in the Islamic republic - attacked Mr Rouhani over the failing deal.

Despite this, there is broad agreement among Iran's senior political figures, including Mr Raisi, that the country must seek an end to the US sanctions in ongoing talks in Vienna aimed at rescuing the nuclear accord.