Mexico's Enrique Pena Nieto hoped definitive election results expected Thursday would officially crown him president-elect, while challenger Andres Manuel Lopez Obrador held out for a shock reversal.
Officials at the Federal Electoral Institute (IFE) were hard at work Thursday tallying the final results, which included a vote-by-vote recount of results at more than half of the country's polling stations.
Results were being projected in real time on giant screens in the IFE's football-field sized press room, especially set up for the election. State and local election results were projected on smaller screens, one for each of Mexico's 32 states.
Preliminary results from Sunday's vote showed Pena Nieto, from the Institutional Revolutionary Party (PRI) with 38 percent of the vote against 31 percent for Lopez Obrador, the candidate for a leftist coalition led by the Party of the Democratic Revolution (PRD).
Lopez Obrador has refused to concede, sparking fears of a repeat of the aftermath of the 2006 presidential election, when he lost by less than one percent, claimed fraud and organized mass protests that paralyzed Mexico City for more than a month.
An anti-PRI "mega march" has been announced for Saturday in Mexico City via online forums and flyers handed out in the street, but it is unclear who is organizing it.
Some 25,000 protesters marched in a similar protest on Monday, according to city police. The march was reportedly organized by the #YoSoy132 student group, though the students later said they had not called for any march.
PRI officials were confident of a ballot-box victory.
"If the votes are counted again, we'll still come out winners," Pena Nieto's campaign coordinator Luis Videgaray said on Wednesday.
The PRI was synonymous with the Mexican state as it governed for seven decades until 2000 using a mixture of pervasive patronage, repression, rigged elections and bribery.
Lopez Obrador has accused the PRI and Pena Nieto's campaign of orchestrated a massive scheme to influence the vote that included distributing 1.8 million gift cards.
Voters in the presidential and legislative elections Sunday allegedly showed PRI officials cell phone pictures of their paper ballot to "prove" they voted for the PRI, and received gift cards in return.
Before the vote, the PRD filed an official complaint over alleged PRI gift cards to be used at PEMEX gasoline stations. Separately, the PAN filed a complaint over alleged PRI bank cash cards. The PRI in turn filed complaints against both its rivals alleging gifts to voters.
The percentage difference in Sunday's vote amounts to some three million votes, election officials say, a wider margin than in the last presidential election but closer than pre-vote surveys had indicated.
The IFE has until September 6 to resolve balloting complaints and formally announce the winner.
Highlighting the tensions, rival PAN and PRI supporters engaged in a street battle in a small town in the southern state of Yucatan over a recount in the vote for the mayor's office. Windows were shattered, vehicles were damaged and ten people were wounded, local media reported.
Separately, President Felipe Calderon acknowledged in an interview with the daily Milenio that displeasure with his administration's policies was one of several factors that resulted in the poor showing of candidates from his conservative National Action Party (PAN).
PAN presidential candidate Josefina Vazquez Mota came in third with about 24 percent of the vote, and PAN candidates lost important regional governorships and seats in both houses of Mexico's congress.
Pena Nieto, who declared victory late Sunday, inherits a country beset by a brutal drug war, an economy struggling to create jobs, and political turmoil as his chief opponent refuses to concede.
The youthful-looking 45-year-old leader has moved quickly since Sunday's election to try to allay fears that the corrupt practices of the once authoritarian PRI could make a comeback.
"We are a new generation. We are not returning to the past. My government has its sights set on the future. Mexico has changed," he told foreign reporters on Monday.
Leaders around the world, including US President Barack Obama, have already congratulated Pena Nieto on his apparent victory.