Moderate cleric Hassan Rowhani said his win in Iran's presidential election was a "victory of progress" over extremism as thousands celebrated in the streets and world powers cautiously welcomed the result.
Tens of thousands of jubilant Iranians took to the streets of Tehran Saturday, toting pictures of 64-year-old Rowhani and chanting pro-reform slogans as news of his victory spread, ending eight years of conservative grip on the top office.
Many were dressed in purple, Rowhani's campaign colour, and others in green, the colour of the reformist movement.
"Tonight we rejoice as there is once more hope in Iran," said Ashkan, 31, holding a poster of Rowhani and wearing a green wristband.
Rowhani was declared outright winner with 50.68 percent of votes cast in Friday's election.
In his first statement after his win was confirmed, he called on world powers to treat Iran with respect and recognise its rights, an apparent allusion to its controversial nuclear policy.
"This is a victory of intelligence, of moderation, of progress... over extremism," Rowhani said.
"A new opportunity has been created by this great epic, and the nations who tout democracy and open dialogue should speak to the Iranian people with respect and recognise the rights of the Islamic republic," he said.
Then they will "hear an appropriate response," he added.
Rowhani 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.
Najjar said 36.7 million people, or 72.7 percent of the electorate, had voted.
Outgoing President Mahmoud Ahmadinejad was constitutionally barred from standing again, having served two consecutive terms.
Supreme leader Ayatollah Ali Khamenei's website congratulated Rowhani on his victory.
"I urge everyone to help the president-elect and his colleagues in the government, as he is the president of the whole nation," Khamenei's Internet site leader.ir reported.
Western countries gave Rowhani's win a cautious welcome.
The United States said it was prepared to engage Iran directly over its disputed nuclear programme following his win.
Such engagement would be aimed at reaching a "diplomatic solution that will fully address the international community's concerns about Iran's nuclear programme," said the White House.
The West suspects Iran's nuclear programme is aimed at building atomic weapons, but Iran insists it is for peaceful purposes.
Rowhani has previously vowed to restore diplomatic ties with the US, which cut relations in the aftermath of the 1979 seizure of the US embassy by Islamist students.
UN Secretary General Ban Ki-moon urged Iran to play a "constructive role" in international affairs, his office said in a message congratulating Rowhani and welcoming the reported high turnout.
EU foreign policy chief Catherine Ashton said in a statement she was committed to working with Rowhani to find a "swift diplomatic solution" to the disputed nuclear programme.
Ashton serves as chief negotiator for the six world powers seeking to check Iran's controversial nuclear ambitions.
French Foreign Minister Laurent Fabius said Paris was "ready to work" with Rowhani and Britain urged him to set the Islamic republic "on a different course".
But Israel said it was Khamenei who decided on nuclear policy, not the president.
"After the election, Iran will continue to be judged by its acts, in the nuclear field as well as that of terrorism," a foreign ministry statement said.
The Jewish state, the region's sole if undeclared nuclear power, has not ruled out a military strike to prevent Iran developing an atomic bomb.
German Foreign Minister Guido Westerwelle welcomed the result as a vote for reforms and "a constructive foreign policy".
The key opposition Syrian National Coalition called on Rowhani to review support for Syria's President Bashar al-Assad.
Rowhani inherits an economy that has been badly hit by EU and US sanctions targeting the key oil and banking sectors because of its nuclear programme.
Friday's vote was the first since the disputed 2009 re-election of Ahmadinejad triggered massive street protests by supporters of his rivals, that were crushed in a deadly crackdown.
In 2003, when Rowhani was top nuclear negotiator under reformist president Mohammad Khatami, the Islamic republic agreed to suspend its controversial enrichment of uranium.
That programme resumed two years later when Ahmadinejad was first elected.
In campaigning, Rowhani pledged to move to ease the sanctions, which have hit hard. Inflation is more than 30 percent, the rial has lost nearly 70 percent of its value and unemployment is rising.
Rowhani is a representative of Khamenei on the Supreme National Security Council, Iran's top security body, and was its secretary for 16 years until 2005.
He has played up his relations with the supreme leader, who has the final say on all key issues, including the nuclear programme.
The 2009 protests that followed Ahmadinejad's re-election led to the eventual house arrest of opposition candidates Mir Hossein Mousavi and Mehdi Karroubi, and the widespread suppression of reformists.
Some of the thousands gathered in central Tehran to celebrate Rowhani's victory were also calling for freedom for Mousavi and Karroubi.