PRI's Enrique Peña Nieto on course for presidency after party spends 12 years rebuilding its formidable machine

The chant rippled from the front of the stage and was adopted by a thousand voices, the volume swelling until the hall reverberated with one endlessly repeated word: Enrique. Enrique. Enrique. Once just a name, now an incantation of victory.

They stood on chairs and leaned from balconies to better glimpse their champion as he strode to the lectern flashing a thousand-watt smile.

Enrique Peña Nieto, movie-star handsome with the role of a lifetime within his reach, had every reason to grin.

"We want a change," he yelled over the cheers. "We want a better Mexico."

This rally in Mexico City was one of the final steps in his seemingly inevitable surge to the presidency. Everywhere you turn Peña Nieto beams from posters, newspapers and televisions. Polls suggest he will vanquish rival candidates and be elected president on July 1. To people like Maria Iris Pimentel, 53, part of the cheering rally, it will be the start of national renewal. "We can start over."

To others, however, that is when political "dinosaurios" once consigned to history's dustbin will return to Los Pinos, the presidential palace, and turn it back into a nest of corruption and authoritarianism. For Peña Nieto is the candidate of the Institutional Revolutionary Party (PRI), the monolith which ruled Mexico through patronage and intimidation for 71 years. Multiparty democracy dates from its loss of the presidency in 2000.

Now, 12 years later, the stunning comeback poses two questions. How did the PRI claw its way back? And has it changed?

The PRI never really went away. Though humiliated and scorned in 2000, when Mexicans exulted in a new era, it retained many local bastions.

The party machinery spent a decade rebuilding links with trade unions, farmers and business interests, consolidating and winning back fiefdoms. It now runs most towns and cities and 20 of 31 states, a font of public funds and patronage.

It was helped by the failure of other parties, notably the National Action Party (PAN), which won the presidency in 2000 and 2006, to significantly boost living standards and democratic institutions, turning hope into disillusion.

The ideologically ambiguous PRI displayed its vocation for power – "we're the only ones who know what to do with it. It's a gene, a chip that we have," said one figure close to the party elite – in anointing Peña Nieto as its candidate two years ago. The governor of Mexico state, which abuts the capital, was in his 40s, telegenic and had a soap opera star wife. The party's old guard – traditionally known as dinosaurs, now also referred to as lizards – hovered off camera.

The conservative PAN, in contrast, fumbled the formidable advantage of incumbency by delaying its would-be successor to the president, Felipe Calderón (who is constitutionally limited to one term), leaving Josefina Vázquez Mota just months to plan a campaign. Worse, she has been ambushed by her own side. Calderón has damned her with faint praise and Vicente Fox, his predecessor as president, has publicly backed Peña Nieto.

The left-wing Party of the Democratic Revolution, say some analysts, sabotaged itself by again running Andrés Manuel López Obrador, a divisive figure who alienated many with a prolonged, doomed effort to overturn the results of the 2006 election, which he narrowly lost and declared rigged. AMLO, as he is known, recast himself as a moderate but still trails Peña Nieto.

Thus Mexico seems poised to reinstate a party whose rule the Nobel laureate Mario Vargas Llosa once called the "perfect dictatorship".

And it will do so under the leadership of a man who was barely known even to his own party six years ago.

Optimists say that regardless who wins the presidency, and for all the disappointments of the past decade, Mexico's fledgling democracy is safe thanks to an emboldened congress and civil society, alternations of power and vigorous political competition. Duelling posters for local and regional elections, to be held on the same day as the presidential vote, festoon villages and cities with promises of "real change", "I am like you", and "we defend your happiness".

How Peña Nieto transformed himself from obscure governor to apparently invincible president-in-waiting partly answers the question of whether the PRI has changed, and what may lie in store for Mexico.

"Nobody had heard of him when he was elected governor but he built up nationwide recognition and positive ratings through the media," said Daniel Moreno, a veteran journalist who runs a news website,

Local media played down or ignored revelations about his extra-marital affairs and other potentially damaging character issues.

However student-led protests, and Guardian revelations over his cosy deals with the network Televisa did roil his campaign in recent weeks, even if the television company has insisted there is nothing untoward in their relationship. "With the PRI some old journalistic vices that we had partially overcome will return," said Moreno.

A more venerable vice – buying votes with cash and gifts – has been captured on video. Activists from all the main parties, but notably the PRI, have been filmed promising microwaves, televisions, umbrellas, furniture and other inducements in poor neighbourhoods.

"Mexican citizens appear to accept the practice as inevitable, just like those of ancient Rome, who after voting for Julius Caesar … let him become a dictator," wrote Sergio Sarmiento, a columnist for the newspaper Reforma.

Despite horrific narco-fuelled violence which has claimed more than 50,000 lives in recent years, Mexicans worry more about finding work and making ends meet. Peña Nieto's mantra about "efficiency" has tapped into a perception that the old PRI, for all its corruption, put more food on tables and would do so again.

"The left pretend to be our friend but believe me, the PRI are the ones who protect our wages," said Oscar Montesdeuca, 38, a metro worker and union activist at what he termed a victory rally. "They look after us."

© Guardian News and Media 2012