Yuri Cortez / AFP
Claudia Sheinbaum was elected Mexico's first woman president by a landslide Sunday, making history in a country plagued by rampant criminal and gender-based violence.
Flag-waving supporters sang and danced to mariachi music in Mexico City's main square celebrating the ruling party candidate's victory.
"I want to thank millions of Mexican women and men who decided to vote for us on this historic day," Sheinbaum told the cheering crowd.
"I won't fail you," the 61-year-old former Mexico City mayor vowed.
She thanked her main opposition rival Xochitl Galvez, who conceded defeat.
Sheinbaum, a scientist by training, won around 58-60 percent of votes, according to preliminary official results from the National Electoral Institute, which estimated turnout at 60 percent.
That was more than 30 percentage points ahead of Galvez, and some 50 percentage points ahead of the only man running, long-shot centrist Jorge Alvarez Maynez.
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.
"Our society is violent, sexist, misogynistic and Dr. Sheinbaum as president will really be able to help change not only the laws but society," said Lol-Kin Castaneda, 48, who waited late into the night to hear the winner speak.
"Mexico can't stand any more violence," she added.
Women going to the polls had cheered the prospect of their favored candidate 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," 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.
Lopez Obrador congratulated his ally with "all my affection and respect."
As well as being the first woman to lead Mexico, "she is also the president with possibly the most votes obtained in the history of our country," he said.
After casting her ballot, Sheinbaum revealed she had not voted for herself but for a 93-year-old veteran leftist, Ifigenia Martinez, in recognition of her struggle.
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 had 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.
© Agence France-Presse