Claudia Sheinbaum was set to be elected Mexico's first woman president on Sunday, exit polls showed, a milestone in a country plagued by rampant criminal and gender-based violence.
The 61-year-old former Mexico City mayor, who was representing the ruling party, won around 58 percent of votes, according to an estimate by the Enkoll polling firm.
That put her comfortably ahead of her main opposition rival Xochitl Galvez -- an outspoken senator and businesswoman with Indigenous roots -- who had 29 percent.
The only man running, long-shot centrist Jorge Alvarez Maynez, had around 11 percent, Enkoll said.
Other media also declared Sheinbaum the winner without specifying the percentage of votes.
An initial official result was expected on Sunday night.
Voters had flocked to polling stations across the Latin American nation, despite sporadic violence in areas terrorized by ultra-violent drug cartels.
Thousands of troops were deployed to protect voters, following a particularly bloody electoral process that has seen more than two dozen aspiring local politicians murdered.
Earlier, Sheinbaum hailed what she called a "historic" election day.
After casting her ballot, the presidential front-runner revealed she had not voted for herself but for a 93-year-old veteran leftist, Ifigenia Martinez, in recognition of her struggle.
"Long live democracy!" Sheinbaum declared.
Mexican women going to the polls had cheered the prospect of a woman breaking the highest political glass ceiling in a country where around 10 women or girls are murdered every day.
"A female president will be a transformation for this country, and we hope that she does more for women," said Clemencia Hernandez, a 55-year-old cleaner in Mexico City.
"Many women are subjugated by their partners. They're not allowed to leave home to work," she said.
Daniela Perez, 30, said that having a woman president would be "something historic," even though neither of the two main candidates was "totally feminist" in her view.
"We'll have to see their positions on improving women's rights, resolving the issue of femicides -- which have gone crazy -- supporting women more," added the logistics company manager.
Nearly 100 million people were registered to vote in the world's most populous Spanish-speaking country, home to 129 million people.
Sheinbaum owes much of her popularity to outgoing President Andres Manuel Lopez Obrador, a fellow leftist and mentor who has an approval rating of more than 60 percent but is only allowed to serve one term.
Reina Balbuena, a 50-year-old street food seller, said she voted for Sheinbaum because the ruling Morena party "has given a lot of support to older adults, to children."
In a nation where politics, crime and corruption are closely entangled, drug cartels went to extreme lengths to ensure that their preferred candidates win.
Hours before polls opened, a local candidate was murdered in a violent western state, authorities said, joining at least 25 other political hopefuls killed this election season, according to official figures.
In the central Mexican state of Puebla, two people died after unknown persons attacked polling stations to steal papers, a local government security source told AFP.
Voting was suspended in two municipalities in the southern state of Chiapas because of violence.
Sheinbaum has pledged to continue the outgoing president's controversial "hugs not bullets" strategy of tackling crime at its roots.
Galvez, 61, vowed a tougher approach to cartel-related violence, declaring "hugs for criminals are over."
More than 450,000 people have been murdered and tens of thousands have gone missing since the government deployed the army to fight drug trafficking in 2006.
The next president will also have to manage delicate relations with the neighboring United States, in particular the vexed issues of cross-border drug smuggling and migration.
As well as choosing a new president, Mexicans voted for members of Congress, several state governors and myriad local officials -- a total of more than 20,000 positions.