The outcome capped a stunning upset by Mahmoud Ahmadinejad, who many reformers fear will take Iran back to the restrictions imposed after the 1979 Islamic Revolution.
The Interior Ministry gave Ahmadinejad 61.8 percent of the vote over his relatively more moderate rival, Ayatollah Hashemi Rafsanjani, who had 35.7 percent. The ministry posted a notice declaring Ahmadinejad the winner of Friday's runoff.
The figures were based on about 54 percent of the estimated 23 million votes cast, or nearly 49 percent of Iran's 47 million eligible voters. In last week's first round of the presidential election, the turnout was close to 63 percent.
The victory gives conservatives control of Iran's two highest elected offices the presidency and parliament and gives a freer hand to the non-elected theocracy, which holds the final word on all important policies.
Clerics led by supreme leader Ayatollah Ali Khamenei have true power in Iran, able to overrule elected officials. But reformers, who lost parliament in elections last year, had been hoping to retain some hand in government to preserve greater social freedoms they've been able to win, such as looser dress codes, more mixing between the sexes and openings to the West.
Ahmadinejad supporters will go to mosques to hold prayers and "thank God for this great victory," said his campaign manager Ali Akbar Javanfekr. But he said no street celebrations are planned.
The streets of Tehran were quiet before dawn. State television had not been announcing the early returns so many people may not yet have known the result.
Ahmadinejad, the 47-year-old mayor of the capital, campaigned as a champion of the poor, a message that resonated with voters in a country where some estimates put unemployment as high as 30 percent. He struck the image of a simple working man against Rafsanjani, a wealthy member of the country's ruling elite.
"The real nuclear bomb that Iran has is its unemployed young people," said Ali Pourassad, after casting his vote for Ahmadinejad at a polling station set up in the courtyard of a mosque in the middle-class south of Tehran. "If nothing is done to create jobs for our young people, we will have an explosion on the streets."