Moderate cleric Hassan Rouhani has called his defeat of conservative hardliners a victory of moderation over extremism and pledged a new tone of respect in international affairs.
Thousands of jubilant Iranians poured onto the streets in celebration of the victory on Saturday, chanting: "Long live reform! Long live Rouhani!", according to witnesses at the scene.
"Ahmadi, bye bye!" they added in reference to President Mahmoud Ahmadinejad - who was legally barred from seeking a third consecutive term.
Many were dressed in purple, Rouhani's campaign colour, and others in
green, the colour of the reformist movement.
Rouhani will take up the presidency, the highest elected office in Iran's hybrid clerical-republican system, in August.
"This victory is a victory of wisdom, a victory of moderation, a victory of growth and awareness and a victory of commitment over extremism and ill-temper," Rouhani told state television, promising to work for all Iranians, including the
hardline so-called "Principlists" whom he defeated at the poll.
"I warmly shake the hands of all moderates, reformists and Principlists," he said.
Rouhani is a former top nuclear negotiator who has championed more constructive engagement with world powers.
He won outright against five conservative candidates with 18.6 million votes, Interior Minister Mohammad Mostafa Najjar said.
That was enough to ensure there would be no run-off against the runner-up, Tehran mayor Mohammad Baqer Qalibaf, who came a distant second with 6.07 million votes.
Saeed Jalili, Iran's Chief nuclear negotiator received four million votes and Mohsen Rezaei, a former head of the elite Revolutionary Guard, was also backed by close to 4 million people.
Matters of national security remain the domain of Iran's Supreme Leader Ayatollah Ali Khamenei, but the president runs the economy and wields broad influence in decision-making in other spheres.