Mr. Peña Nieto is married to one of the country’s biggest soap opera stars. Despite some gaffes, and the recent acknowledgment of two out-of-wedlock children, he still leads by about 20 percentage points in some opinion polls.

The third major-party candidate is Andrés Manuel López Obrador of the leftist Democratic Revolutionary Party. A former Mexico City mayor, he is trailing in polls but has a passionate base of supporters left over from his narrow loss in 2006 to President Felipe Calderón, who is barred by law from seeking a second six-year term.

But an indication of how a woman in the race could alter the political terrain came in December, when Mr. Peña Nieto dismissed a question about the price of tortillas, a staple in any Mexican household, with a curt “I am not the lady of the house.”

He was pummeled on social networks, and Ms. Vázquez Mota promptly gave an interview to a prominent female journalist on the subject of balancing work and family.

“I am a woman, I am a housewife, I am a government official, I’ve been twice a government secretary, I’ve been leader of a parliamentary group, I am an economist,” she said. “Although we may not be there for many hours, as in my case — and I’m sure your case and many others of us — every night we return to the kitchen to check the refrigerator and see if everything is ready or what needs to be bought the next day.”

Mexico may be steeped in machismo, but Ms. Vázquez Mota’s advisers saw Mr. Peña Nieto’s comments as increasingly behind the times.

Women’s political gains have been most evident in the lower chamber of the national legislature, which has 148 women, nearly 30 percent of the body, compared with 116 five years ago. The gains have been slower in the upper chamber, the Senate, which has 29 women, or about 23 percent of the body, compared to 22 in 2006. Five women have been elected state governors.