Claudia Sheinbaum seems poised to cement her historic victory as Mexico’s first female president with a supermajority in congress that would let her party pass legislation and budgets unopposed – and perhaps even change the constitution without need for compromise.

Sheinbaum, a 61-year-old climate scientist and former mayor of Mexico City, won the presidency with 59.5% of the vote, according to a rapid sample count by Mexico’s electoral authority.

During the campaign, Sheinbaum portrayed herself as a continuity candidate, vowing to keep the policies of her populist predecessor, Andrés Manuel López Obrador, known popularly as Amlo, who founded the Morena party in 2014 and forged a bond with voters disenchanted with democracy.

López Obrador was constitutionally unable to run again, but chose Sheinbaum as his successor – and she appears to have won 5m votes more than he did six years ago.

“In the 200 years of the republic, I will become the first woman president of Mexico,” Sheinbaum told supporters in a victory speech late on Sunday, to loud cheers of “presidenta, presidenta” – the feminine form of the country’s top political post.

Thanks in part to a constitutional amendment that set the goal of gender parity in all races for elected office and in appointments for top jobs in government, women now hold half the seats in Mexico’s congress and almost half the jobs in cabinet and one-third of the governorships.

Activists will hope to see this prominence of female leaders translate into policy.

In 2023, Mexico’s supreme court ruled that prohibiting abortion was unconstitutional, but this has been slow to manifest in safe and accessible abortion at the state level. Meanwhile, gender-based violence continues to rise.

Although countries across Latin America have had female presidents, Sheinbaum’s victory makes her the first woman to be elected to lead a North American country.

Sheinbaum’s main challenger was another woman, Xóchitl Gálvez, who won 27.6% of the vote as candidate of the opposition coalition. She was unable to overcome the unpopularity of the traditional parties backing her, which many voters view as serving the elites.

Aside from the presidency, more than 20,000 posts were up for grabs in Mexico’s biggest election ever.

Morena and its allies are poised to win a two-thirds supermajority in one and perhaps both houses of congress, which would allow it to amend the constitution at will.

Amlo has already laid out a desired packet of reforms that is wide-ranging and occasionally eccentric, including pension reform but also outlawing animal abuse, as well as banning fracking and the sale of vapes.

But the most controversial would be a reform to elect supreme court justices by popular vote. The court has often stood against Amlo, and such a reform could place it under Morena’s control.

On Monday, Amlo said he did “not want to impose anything” on Sheinbaum, before later adding: “I do think we have to address the issue of judicial reform … There has to be a judiciary that represents the Mexican people, that is incorruptible, because if not, we will not move forward.”

Of the nine gubernatorial races, Morena held six and won the state of Yucatán, meaning it now controls 24 of Mexico’s 32 federal entities.

Altogether, Morena will hold more political power than any party since Mexico’s transition to democracy in 2000. The peso slid against the dollar as investors reacted with jitters to Morena’s projected hegemony.

Sheinbaum will take power on 1 October with a huge mandate but substantial challenges to address – not least the violence, corruption and impunity that failed to improve under Amlo, as organised crime groups fight to deep their control of territory and local businesses.

“Security, and the wake of victims, of pain, of anger, sown through great parts of the country – these are the hardest parts of the legacy that [Amlo] leaves Claudia,” said Blanca Heredia, a political analyst.

Amlo also hugely expanded the role of the military into areas typically reserved for civil society, such as domestic security and infrastructure construction. “Managing the army will require great intelligence from Sheinbaum, because they have been given many responsibilities, many resources,” said Heredia.

“Another pending issue is perhaps national reconciliation,” said Vanessa Romero, a political analyst. “These elections were particularly incendiary, as if there were two Mexicos and they don’t talk to each other.”

A month after Sheinbaum takes power, the US is set for its own election and a showdown between Joe Biden and Donald Trump.

The countries’ economies are deeply intertwined, with Mexico the top trading partner of the US. Mexico is also the immediate source of the fentanyl that kills 70,000 Americans a year, and a transit country for US-bound migrants – meaning it will play a key role in the US election.

“I look forward to working closely with President-elect Sheinbaum in the spirit of partnership and friendship that reflects the enduring bonds between our two countries,” said Biden in a statement.

In her victory speech, Sheinbaum said the US-Mexico relationship would be based on “mutual respect” before adding: “We will always defend Mexicans who are on the other side of the border.”

This article was amended on 4 June 2024. An earlier version said that Claudia Sheinbaum was “the first woman to lead a North American country”. She is the first woman to be elected as leader of a North American country, but Kim Campbell was prime minister of Canada for a short period in 1993.