Mexico's presumed President-elect Enrique Pena Nieto has thanked voters for giving his PRI party another chance and has vowed no return to the past.
With almost all votes counted, Mr Pena Nieto is about six points ahead of his nearest rival, Andres Manuel Lopez Obrador, who has not admitted defeat.
The PRI (Institutional Revolutionary Party) governed Mexico for 71 years but has been out of power since 2000.
The election campaign was dominated by the economy and the war on drugs.
Mr Pena Nieto, 45, declared himself the winner of Sunday's presidential election after a preliminary count.
He promised to govern "with and for all", saying he would "honour" the PRI's second chance with "a new style of governing".
With more than 96% of the vote counted, Mr Pena Nieto had secured 38.05% of votes cast, compared with 31.7% for Mr Lopez Obrador, preliminary official results showed.
Josefina Vazquez Mota, the candidate of Mr Calderon's governing National Action Party (PAN), took 25.44% and has already accepted defeat.
Many voters abandoned the PAN because of the deaths of more than 55,000 people in drug-related violence since President Calderon deployed the army to fight Mexico's drug cartels.
Mr Lopez Obrador said he would await a full count and a legal review before accepting any result.
In 2006, he launched months of street protests and alleged vote fraud after he was found to have lost to Mr Calderon by 1%.
With nearly half the Mexican population living in poverty, the economy was one of the main issues in the campaign.
Unemployment remains low at roughly 4.5%, but a huge divide remains between the rich and the poor.
Mr Pena Nieto had been presented as the new face of the PRI, a break with the party's long and at times murky past that included links with drug gangs.
The party held on to power for 71 years until it was defeated in 2000.
Mr Pena Nieto built his reputation on the "pledges" he set out for his governorship in Mexico state, focusing on public works and improvement of infrastructure.
Outgoing President Felipe Calderon has congratulated Mr Pena Nieto and promised to work with him during the transition to his inauguration in December.