Mexicans will vote on Sunday in an election that is groundbreaking on several fronts: it’s set to be the largest race in the country’s history, it’s already among the most violent in recent memory, and it will likely put a woman in the presidency for the first time ever.

The two main contenders, who have largely split the electorate between them according to polls, are women. The front-runner is Claudia Sheinbaum, a climate scientist representing the ruling party and its party allies. Her closest competitor is Xóchitl Gálvez, a businesswoman on a ticket that includes a collection of opposition parties.

Ms. Sheinbaum has had a double-digit lead in the polls for months, but the opposition has argued those numbers underestimate the true support for their candidate. In an interview, Ms. Gálvez said “there is an anti-system vote,” and if Mexicans turned out in force on Sunday, “we will win.”

“She’s in the mind-set where she’s ahead by 30 points,” said Ms. Gálvez, of her rival. “But she’s going to have the surprise of her life.”

The contest showcases the immense strides in Mexico’s politics made in recent years by women, who weren’t even allowed to vote in the country until 1953. Both the top candidates come with considerable experience; Ms. Gálvez was a senator and Ms. Sheinbaum governed the capital, one of the largest cities in the hemisphere.