Mexico's presidential election is too close to call as electoral authorities work round the clock to verify vote tallies from Sunday's ballot.
Preliminary results earlier in the week put Mr Calderon ahead
With counting almost complete, conservative candidate Felipe Calderon overtook his leftist rival Andres Manuel Lopez Obrador by a fraction.
Mr Calderon's supporters have begun celebrating in Mexico City, but official results are not yet available.
The Federal Electoral Institute says it expects final tallies within hours.
With more than 99% of votes verified, Mr Calderon held a narrow lead over Mr Lopez Obrador, but appeared confident of winning many of the remaining votes.
The gap between the pair has come down to just thousands of votes out of an electorate of 41 million.
Mr Calderon, the candidate of the ruling National Action Party (Pan), appeared in front of jubilant supporters early on Thursday, but stopped short of claiming outright victory.
"We are ahead in the election for the presidency and the remaining votes to be counted will be in our favour," he said.
He reiterated earlier calls for unity, telling crowds that Mexico should "begin a new era of peace, [and] of reconciliation".
But whatever the outcome, the candidate that loses will inevitably challenge the outcome, says the BBC's Daniel Lak in Mexico City.
Mr Lopez Obrador took the lead as the verification process started, only for Mr Calderon to pull slightly ahead as results came in from his electoral strongholds.
The recount has involved checking the tallies attached to ballot boxes, which were sealed after Sunday's election.
Individual ballots have not been reviewed unless the boxes appeared tampered with or if the tallies were missing, illegible or inconsistent.
Mr Lopez Obrador, the candidate of the Party of the Democratic Revolution (PRD), refused to accept preliminary results that gave Mr Calderon a narrow lead.
He alleged there had been "inconsistencies" and "serious evidence of fraud", and said that if he lost he would call for a ballot-by-ballot recount.
300 electoral districts count ballot box tallies
Ballot boxes opened and recounted if discrepancies
Winner expected to be announced on Thursday
Parties then have four days to present legal challenges
Electoral court must resolve challenges by 31 Aug
Final result would be declared by 6 Sep
Left-wing supporters gathered in Mexico City's main square, the Zocalo. A few tried to break down the gates to the IFE offices but were stopped by fellow demonstrators.
Mr Lopez Obrador has urged his supporters to remain calm, but has warned that "the stability of the country hangs in the balance".
The prospect of lengthy legal battles and street protests over the results has raised fears of unrest in a neighbouring country that is key to US interests over drugs, immigration and security.
The head of the electoral institute (IFE), Luis Carlos Ugalde, told a new conference late on Wednesday that final results would only be released when absolute confirmation was available, to avoid any confusion.
The IFE will hand the final result over to a seven-judge tribunal and legal proceedings are then almost certain to begin.
Mr Lopez Obrador has called for a recount of all 41 million votes
Once the count is complete, the Federal Electoral Tribunal, the ultimate arbiter of disputes, will consider any formal complaints.
Mexico's election system, once mired in corruption, vote-buying and intimidation, has improved over the last decade.
The electoral institute, created in 1990, is independent of government and highly regarded but it is facing its biggest test so far.
The successor to President Vicente Fox is due to be inaugurated on 1 December.