MEXICO CITY (Reuters) - Mexico’s ruling Institutional Revolutionary Party, or PRI, was one of the most successful brands in 20th-century politics, but a record defeat in Sunday’s presidential election has left its future hanging in the balance.

FILE PHOTO: A union worker waves a flag during an event to nominate Jose Antonio Meade as presidential candidate of the ruling Institutional Revolutionary Party (PRI) at Foro Sol in Mexico City, Mexico February 18, 2018. REUTERS/Carlos Jasso /File Photo

Pushed into third place with its worst-ever showing, the PRI candidate Jose Antonio Meade won just over 16 percent of the vote, less than a third of that garnered by the winner, veteran leftist Andres Manuel Lopez Obrador, preliminary results show.

The wipeout swept the country, shattering the centrist PRI in many traditional strongholds, including Atlacomulco, the hometown of the party’s outgoing President Enrique Pena Nieto, about 55 miles (89 km) from Mexico City.

“I never thought we could end up so low, and finish with such poor results,” said Enrique Jackson, a PRI lawmaker and former Senate leader. “It’s really upsetting.”

(For a graphic on Mexico's election, see: tmsnrt.rs/2MVhfjA)

The PRI, which governed continuously from 1929 to 2000, and again from 2012, also lost all nine gubernatorial races on Sunday. Until 1989, the PRI had never lost a governorship.

Sunday’s results mean that Mexico’s 31 states are set to be governed by five different parties and one independent.

The PRI’s precipitous decline leaves a void in the fractured political landscape, which Lopez Obrador and his National Regeneration Movement (MORENA) party look set to fill.

Rampant gang violence, patchy economic growth and a slew of corruption scandals have battered the PRI’s standing. Pena Nieto had the lowest approval rating of any president in Mexico’s 21st century history.

“The new PRI, whether it’s called the PRI, or it changes its name, has to get rid of all the rubbish, all the parasites who have done so much damage to the party,” said Heriberto Galindo, a party veteran and former lawmaker.

The PRI defeat is the latest backlash to hit Latin American governments dogged by corruption, with scandals bringing down presidents from Brazil to Peru.

LACK OF TRUST

The PRI knew long before the July 1 vote that it was in trouble.

Hoping to remove the stain of graft, the party passed over internal heavyweights to run with Meade, a cabinet minister with a reputation for honesty who is not even a member of the party.

One PRI election banner painted in towns across the Gulf state of Veracruz, which the party lost in 2016, spoke volumes about the PRI’s low standing with voters.

“We are working hard to regain your trust,” it said.

But it was not enough to change people’s minds.

“If he hadn’t been running for the PRI, if he’d been in any other party, I’d have voted for Meade,” said Ruben Moreno, a 52-year-old security worker in Mexico City.

Tensions in the PRI over the election are already surfacing.

Ulises Ruiz, a former PRI state governor, told local television on Tuesday night that “a series of errors” were made by the party’s leaders in bringing in outsiders such as Meade and ignoring voters’ concerns on security, poverty and corruption.

Founded to consolidate political control after the bloodshed of the 1910-1920 Mexican Revolution, the PRI was, in part, a reaction against the excessive concentration of power in one man under the long rule of dictator Porfirio Diaz.

Keeping a tight rein on the country through a mix of corporatism, political patronage and corruption, the party initially had notable successes.

Poverty fell steadily from the end of World War II during a period of rapid economic growth known as the “Mexican Miracle.” But eventually, currency devaluations and overspending took their toll, and Mexico defaulted on its foreign debt in 1982.

The PRI held on, but its image was tarnished. Another major financial crisis in 1994-95 helped pave the way for the party’s first presidential election loss in 2000.

Rising drug-cartel violence under its conservative successors opened the door to a PRI comeback in 2012, though with its power and prestige diminished. Now only a rump of the current PRI will remain in the next Congress.

Under Pena Nieto, the PRI and its allies had a slim majority in the lower house. But projections by Mexico’s federal electoral authority suggest it lost over three-quarters of its seats on Sunday as MORENA and its allies dominated.

Like many in the ranks of MORENA, which was only formally constituted as a party in 2014, Lopez Obrador cut his teeth in the PRI. By the late 1980s, he had had enough, and split.

Yet one of his political heroes remains Lazaro Cardenas, a key figure in PRI history who nationalized the oil industry in 1938 during the party’s early, more socialist days.

Like Cardenas, Lopez Obrador traversed the remotest provinces to create a base of support among Mexico’s neediest - a sector of the population some in the party believe its technocratic leaders of recent years have lost touch with.

“We need to look toward the left again,” said Maria de los Angeles Moreno, a former national leader of the PRI, pointing to the personal rapport Lopez Obrador established with voters.

She and fellow PRI members Jackson and Galindo said there is a way back for the party if it is well-led, cleans up its image and can craft intelligent policies.

It will hold 12 state governorships after the election - fewer than ever before, but still as many as any other party.

‘INTENSIVE CARE’

Dubbed the “perfect dictatorship” by Peruvian writer Mario Vargas Llosa, the PRI stood apart from peers in Latin America for the degree of stability it maintained during political volatility that roiled the region in the 1960s and 1970s.

Brutal crackdowns on civil protests, such as Mexico’s 1968 Tlatelolco massacre, which saw security forces open fire on student demonstrators, earned the PRI a reputation for authoritarianism. Its popularity began to suffer.

But though the PRI’s early leaders had been generals, Mexico never descended into military dictatorship, as Brazil, Argentina, Chile and other Latin American countries did. Nor did it succumb to protracted guerrilla conflict like Colombia.

“It was a very ingenious system that combined a hegemonic party and an omnipotent president every six years. It was a kind of hereditary monarchy,” said Mexican historian Enrique Krauze.

Yet having failed to grasp the damage that corruption could do to its name once back in power in 2012, the PRI had landed itself in “intensive care” after Sunday’s losses, he said.

Into the void steps Lopez Obrador, who Krauze worries could rule as a “caudillo” or strongman after his landslide win.

“This is a country that abhors a power vacuum,” Krauze said. “In part, the election was about voting for a strong leader and so (the country) is feeling relieved. But obviously I’m concerned there’s such enormous power invested in one person.”