Delfina Gomez, the candidate of Mexico's ruling Morena party, votes on the outskirts of the capital Mexico City
Delfina Gomez, the candidate of Mexico's ruling Morena party, votes on the outskirts of the capital Mexico City AFP

The once-dominant PRI conceded defeat on Sunday to Mexico's ruling party in a key state election seen as a prelude to next year's presidential vote.

A total of 12.6 million people were eligible to vote for the governor of the State of Mexico, a region on the outskirts of the capital which encapsulates all the contrasts of the country, from economic dynamism to criminal violence.

The Institutional Revolutionary Party, the country's main opposition party, has seen its influence wane as President Andres Manuel Lopez Obrador's left-wing Movement for National Regeneration (Morena) makes gains.

The PRI's candidate recognized on Sunday the "triumph" of Morena's candidate, Delfina Gomez, after the electoral commission released preliminary results.

With 88.1 percent of votes counted, Gomez had a nine percent lead over her PRI rival.

Former teacher Gomez thanked her voters who "made this victory possible".

Gomez's bid has been boosted by the popularity of Obrador, in office since December 2018.

The PRI, which held power from 1930 to 2000, and then again between 2012 and 2018, had been described in the past as a "perfect dictatorship" by Nobel Prize in Literature winner Mario Vargas Llosa.

A loss in the State of Mexico would deny PRI its historical bastion.

"I hope it will be a beautiful day for the Mexiconses," the term for inhabitants of the state, said Gomez as she cast her ballot.

Despite approval ratings of around 60 percent, the constitution requires Obrador to step down in 2024 at the end of a single six-year mandate, leaving his political allies jostling to replace him.

Morena already governs 22 of the country's 32 states, either alone or with its allies.

Many residents of the State of Mexico, the country's most populous, lack basic services, even as they live alongside wealthy areas peppered with luxurious homes in a stark illustration of the country's inequalities.

Home to the Teotihuacan pyramids, the state is also a hub for industrial giants such as Nestle and Ford.

Its economy represents 9.1 percent of the nation's GDP.

The State of Mexico is one of the country's most violent regions.

More than 900 murders were registered in the region between January and April of this year, out of a total of around 9,900 nationwide.

With 17 million residents -- more than Belgium, Switzerland, and many other European countries -- the State of Mexico is a "mini-Mexican Republic," according to the political scientist Miguel Tovar from Alterpraxis.