From the BBC:
Mexico's old ruling party, the PRI, is set to return to power as early official results indicate its candidate Enrique Pena Nieto has won the presidential election.
Mr Pena Nieto, 45, is on some 38%, several points ahead of Andres Manuel Lopez Obrador, who has not conceded.
Thousands of police were on duty for the vote, amid fears of intimidation from drug gangs.
Mexicans were also electing a new congress and some state governors.
Celebrations at the headquarters of the PRI (Institutional Revolutionary Party) started after the polls closed.
Mr Pena Nieto declared: "We all won in this election. Mexico won."
"This is just the start of the work we have before us."
He thanked Mexican voters for giving the PRI a second chance, saying his administration would have a "new way of governing".
The election campaign was dominated by the economy and the war on drugs.
"There will be no pact nor truce with organised crime," Mr Pena Nieto said.
He 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.
Outoing President Felipe Calderon has congratulated Mr Pena Nieto and promised to work with him during the transition to his inauguration in December.
Andres Manuel Lopez Obrador, running for the leftist Party of the Democratic Revolution (PRD) is in second place with about 31% of the vote.
Mr Lopez Obrador, who was the runner-up in the 2006 election, has not conceded victory.
"The last word hasn't been spoken yet," he said.
In 2006, he refused to recognise Mr Calderon's victory and led street protests for months afterwards.
Josefina Vazquez Mota, the candidate of the governing National Action Party (PAN) had already accepted defeat.
The official quick count by the electoral authorities, IFE, put her on some 26%.