Mexico's centre-left presidential candidate Andres Manuel Lopez Obrador has said he will challenge the outcome of Sunday's presidential election.
Lopez Obrador is insisting all votes be recounted
Final results have confirmed a razor-thin victory for his conservative rival, Felipe Calderon.
Mr Lopez Obrador said he would appeal to the courts, and urged his supporters to rally on Saturday in Mexico City.
Mr Calderon, however, said he would take office as president and vowed to work for all Mexicans.
"The election is behind us. It is time for unity and agreement among Mexicans," he told a noisy crowd of supporters at the headquarters of his ruling National Action Party.
The results came after electoral officials worked around the clock to verify ballots from the 2 July poll.
The final tally showed that just a few hundred thousand votes separated the two men.
Calderon called for a "new era of peace"
Mr Calderon finished with 35.88%, against 35.31% for Mr Lopez Obrador, the candidate of the Party of the Democratic Revolution (PRD) and former mayor of Mexico City.
Preliminary results after Sunday's election had given a lead of 0.6% to Mr Calderon but Mr Lopez Obrador refused to concede.
Mr Lopez Obrador is repeating his demand for ballot-by-ballot recount of the 41 million votes.
"We are going to the Federal Electoral Tribunal with the same demand - that the votes be counted - because we cannot accept these results," he said, adding that there had been "many irregularities".
His supporters wept in the streets as the final results emerged, and vowed not to let him be robbed of the presidency, the Associated Press news agency reported.
Mexico seems set for weeks of legal wrangling reminiscent of the challenges that followed the US election in 2000.
Once the Federal Electoral Institute (IFE) announces the official result, candidates have four days to lodge a legal complaint with the electoral court.
The Federal Electoral Tribunal, the ultimate arbiter of disputes, has until early September to certify the winner.
The extremely close result only confirms the divisions that exist between the right and left of Mexican politics, says the BBC's Daniel Lak in Mexico City.
The poor and working class voters who support Mr Lopez Obrador with almost fanatical devotion are being told that the election and the country have been stolen from them, our correspondent says.
Mr Calderon's backers in the middle and upper classes and the business community will be relieved that their candidate has apparently won, but apprehensive about the confrontation and possible unrest to come, he adds.
The successor to President Vicente Fox is due to be inaugurated on 1 December.