"We have reached a solution to the problem," said Max Mathurin, president of the Provisional Electoral Council. "We feel a huge satisfaction at having liberated the country from a truly difficult situation."
Gerard Latortue, the prime minister, said: "We acknowledge the final decision of the electoral council and salute the election of Mr. Rene Preval as president of the republic of Haiti."
There was no reaction visible in the streets of the capital in the pre-dawn hours on Thursday.
The election last week had triggered massive street protests by backers of Preval, who said fraud was being carried out to deprive him of the 50% plus one vote needed for a first-round victory.
Preval, an agricultural scientist and former president, will replace Jean-Bertrand Aristide, his former mentor, who was ousted in a bloody rebellion two years ago.
With 90% of ballots counted, Preval had been just shy of the 50% margin needed for a first-round election win. But under the agreement, some of the blank votes - representing 4% of the estimated 2.2 million ballots cast - were subtracted from the total number of votes counted, giving Preval the majority, said Michel Brunache, chief of cabinet for Boniface Alexandre, the interim president.
Many ballots were recovered
from a rubbish dump
"Preval wins with 51.15%," Brunache said after the meeting ended. "On 7 February, the people made a choice. It is a historic day."
A popularly elected government with a clear mandate is seen as crucial to avoiding a political and economic meltdown in the Western Hemisphere's poorest nation. Gangs have gone on kidnapping sprees and factories have closed for lack of security.
The agreement capped a tense nine days since Haitians began turning out in droves to elect a new government for this impoverished Caribbean nation. They almost overwhelmed election workers by their numbers. When election returns were slow in coming, suspicion built that the vote count was being rigged.
At least one Preval supporter died in largely peaceful street protests. Preval claimed on Tuesday that "massive fraud or gross errors" had been committed and he had vowed to challenge the results if officials had insisted on holding a March run-off.
The UN mission in Haiti said late on Wednesday that the discovery of voting bags, marked ballots and other election materials in a garbage dump was an "apparent grave breach of the electoral process".
At least one Preval supporter
died in street protests
AP journalists saw thousands of ballots, some marked for Preval, in the rubbish dump along with a vote tally sheet and four bags meant to carry returns. Discovery of the ballots was initially reported by Haitian TV on Tuesday night.
In a statement, the UN expressed "deep concern at the media reports of ballot papers being deposited and burnt on the northern outskirts of Port-au-Prince" and said it "urges the Haitian authorities to investigate fully and prosecute anyone found guilty of this apparent grave breach of the electoral process."
Earlier in the day, UN police rushed to recover the election material from the stinking, flyblown dump.
Preval backers - who held massive demonstrations, erected barricades and stormed into a hotel this week to protest against alleged fraud - had accused election officials of attempting to annul votes for Preval to force a run-off.
On Tuesday, Preval urged his followers to continue to protest non-violently. Scattered demonstrations occurred on Wednesday in Port-au-Prince.