Reformist-backed cleric Hassan Rouhani has won Iran's presidential election, securing just over 50% of the vote and so avoiding the need for a run-off.
Tehran Mayor Mohammad Baqer Qalibaf was well behind in second place.
Turnout was estimated at 72.2% among the 50 million Iranians who were eligible to vote to choose a successor to Mahmoud Ahmadinejad, who was ineligible to stand again.
Mr Rouhani has pledged greater engagement with Western powers.
Supreme Leader Ayatollah Ali Khamenei is scheduled to ratify the vote on 3 August.
The new president will then take the oath in parliament.
Ayatollah Khamenei has congratulated Mr Rouhani on his victory.