Reformist-backed cleric Hassan Rohani has won Iran's presidential election, securing just over 50% of the vote.
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.
Interior Minister Mostafa Mohammad Najjar announced that Rohani had won 18,613,329 of the 36,704,156 votes cast. This represented 50.68% of the vote.
Voting had been extended by five hours on Friday evening to allow more people to cast their ballots.
Although all six candidates were seen as conservatives, analysts say Rohani - a 64-year-old cleric often described as "moderate" who has held several parliamentary posts and served as chief nuclear negotiator - has been reaching out to reformists in recent days.
The surge of support for him came after Mohammad Reza Aref, the only reformist candidate in the race, announced on Tuesday that he was withdrawing on the advice of pro-reform ex-President Mohammad Khatami.
One eligible voter, Mahdi, a software developer from Mashhad told the BBC he had not cast a ballot as he was "against the Islamic Republic".
But he added: "Having said that, I hope Rohani wins, because he is the best candidate... Rohani won't change things dramatically, he will probably only make things slightly better."
After the last presidential election in June 2009, millions of Iranians took to the streets to demand a rerun, when the supreme leader dismissed claims of widespread fraud from the three defeated candidates.