Frontrunner Claudia Sheinbaum is set to become Mexico's first woman president in a historic win, exit polls suggest.
Pollsters predicted that the 61-year-old former mayor of Mexico City had won 56% of the vote in Sunday's election, convincingly beating her main rival, businesswoman Xóchitl Gálvez.
Ms Sheinbaum's Morena party has already claimed victory - but Ms Gálvez urged her supporters to wait for the official results, expected to be announced early on Monday.
Voters were also electing all members of Mexico's Congress and governors in eight states, as well as the head of Mexico City's government, in the campaign marred by violent attacks.
The government says more than 20 local candidates have been killed across Mexico, although private surveys put the total at 37.
Two people were reported killed in two attacks on polling stations in the state of Puebla on Sunday, officials said.
Ms Sheinbaum, a scientist who ran Mexico City in 2018-23, has the backing of the outgoing president, Andrés Manuel López Obrador.
Mario Delgado, the president of Mr López Obrador's party, called her expected victory a "stellar moment in the history of our country".
Mr López Obrador, who has been in power since 2018, cannot run for the top office again, as under Mexico's constitution, presidents are limited to a single six-year-term.
The popular leader - recent polls suggested he had an approval rate of close to 60% - has instead thrown his weight behind Ms Sheinbaum, who is part of his Morena party.
While many of the promises President López Obrador made upon taking office have remained unfulfilled, his efforts to reduce poverty and help elderly Mexicans have been popular with beneficiaries of these social programmes.
Having the backing of the president may have considerably widened Ms Sheinbaum's base of voters, but it has also raised questions about how independent she is of the sometimes overpowering leader.
Ms Sheinbaum has stressed that she is very much her own woman, while at the same time promising to continue building on what she says are Mr López Obrador's many achievements.
Their party boasts about how millions of Mexicans have been lifted out of poverty during the past six years.
Morena says the number of people living in poverty is dwindling thanks to its policies, such as more than doubling the minimum wage.
But economists have pointed out that there are also other factors at play, such as a rise in remittances being sent by Mexicans living abroad to their friends and family at home.
Ms Sheinbaum's main opponent at the polls is senator and businesswoman Xóchitl Gálvez.
Ms Gálvez, 61, was chosen by a broad coalition of parties who share a desire to put an end to the rule of the Morena party.
She and the Strength and Heart for Mexico coalition she is running for have been critical of the rise in violence the country has experienced in the run-up to the election.
Speaking at her closing rally, she told Mexicans that if they voted for her they would have "the bravest president, a president who does confront crime".
And while she has repeatedly derided the strategy Mr López Obrador laid out at the start of his presidency, when he promised "hugs not bullets" in the battle against crime, Ms Gálvez has provided little detail as to how she would combat the powerful criminal groups which are behind much of the violence which is blighting the country.
She has said that she would offer better pay to the police and invest more in security in general.
But what has arguably made her more popular with voters critical of the outgoing president is her promise to strengthen institutions she says Mr López Obrador tried to weaken, such as the constitutional court and the National Electoral Institute.
Ms Gálvez has accused Mr López Obrador of being authoritarian and of undermining Mexico's democratic institutions, calling his government "arrogant and overbearing".
Polls closed at 18:00 local time on Sunday (01:00 BST Monday), and the winning candidate will take office at the end of September.
Latest Stories
-
Livestream: The manifesto debate on WASH and climate change
5 mins -
Alan Kyerematen saddened by NDC and NPP’s neglect of Krofrom Market in the Ashanti Region
9 mins -
CSIR Executive Director urges farmers to adopt technology for improved farming
23 mins -
Football Impact Africa’s Ghetto Love Initiative inspires change in Teshie
34 mins -
Peter Toobu calls for tighter border security over uncovered weapons at Tema Port
36 mins -
Gov’t has failed its commitment to IPPs – Ablakwa
40 mins -
Sell Chrome to end search monopoly, Google told
52 mins -
KATH to install seven new dialysis machines by end of November
55 mins -
Walewale: Police confiscate 37 bags of cocoa beans suspected of being smuggled out of Ghana
1 hour -
‘Expired’ Rice Scandal: FDA confirms rice was safe for consumption after rigorous lab tests
1 hour -
Many women have experienced intimate partner violence – Angela Dwamena Aboagye
2 hours -
Power challenges persist due to government’s mismanagement of revenues – Okudzeto Ablakwa
2 hours -
Jordan Ayew injury not as bad as feared – Leicester City boss
2 hours -
Stonebwoy heads to North America for UP & RUNNIN6 tour
2 hours -
FDA explains extension of best-before date for ‘expired’ rice
2 hours