The new face of the party that governed Mexico for seven decades has claimed victory in the country's presidential election.
Enrique Pena Nieto, bidding to return the Institutional Revolutionary Party (PRI) to power, declared he had beaten challenger Andres Manuel Lopez Obrador.
An early representative count by the Federal Electoral Institute (IFE) showed the 45-year-old had around 38% of the vote against around 31% for Mr Obrador from the Party of the Democratic Revolution (PRD).
The margin between the two contenders was not as wide as in exit polls, but appears difficult to overcome.
Pena Nieto entered the PRI headquarters in Mexico City to a hero's welcome soon after the results were announced.
"Presidente! Presidente!" the crowd chanted.
"We're a new generation. There is no return to the past," he responded. "It's time to move on from the country we are to the Mexico we deserve and that we can be ... where every Mexican writes his own success story."
He also mentioned the violence plaguing the country, which has left more than 50,000 dead since outgoing President Felipe Calderon deployed the military to crack down on drug cartels in late 2006.
He said he would not make pacts with organised crime, but will instead focus on curbing violence.
Mr Obrador, however, refused to concede. "The last word has not been said yet," he argued.
"We have information that indicates a different outcome from what we are being officially told."
He had earlier said he could pull off an upset by attracting voters who want to prevent the PRI from returning to power.
For decades synonymous with the Mexican state, the PRI governed through a mix of lavish patronage and selective repression, and by isolating political foes through rigged elections and skewed media coverage.
Peru's Mario Vargas Llosa once dubbed it "the perfect dictatorship".
Mr Obrador was one of the prominent left-wing PRI members who split with the party after the controversial 1988 election and co-founded the PRD.
The PRI was in power for 71 years until 2000, when Vicente Fox from the conservative National Action Party was elected president. He was followed by Mr Calderon, a fellow PAN member.
Mr Obrador, often referred to by his initials AMLO, lost the 2006 presidential vote by less than 1%. Outraged at perceived voter fraud, he closed down Mexico City with street protests for more than a month.
His lead in the polls has not been dented by bland performances in the televised presidential debates, a student movement prematurely dubbed the "Mexican Spring" or leaked documents alleging that he paid for years of glowing media coverage.
Even though security is a top concern in Mexico, the candidates have only proposed slight modifications to Mr Calderon's disliked policies.