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 puts 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.