(This version of September 20’s story corrects to change political affiliation of senator in paragraph 12)

Soldiers and rescue workers search in the rubble of a collapsed building after an earthquake in Mexico City, Mexico September 20, 2017. REUTERS/Henry Romero

MEXICO CITY (Reuters) - Less than a year before a presidential election, Mexico’s politicians are fearful they could be punished by voters for any misstep in responding to two major earthquakes that killed more than 300 people this month.

With tolerance low after years of violence and corruption, the tremors could further undermine voters’ confidence in the ruling party of President Enrique Pena Nieto and the entire political class.

“We’re clearly aware that this is a test we cannot flunk,” said Senator Miguel Angel Chico of the ruling Institutional Revolutionary Party, or PRI.

Pena Nieto sprang into action this month after an 8.1 magnitude earthquake on Sept. 7, the strongest in nearly a century, leveled parts of southern Mexico and killed at least 98 people.

On Tuesday, when a 7.1 tremor struck, he aborted a trip to the first quake’s disaster zone to return to Mexico City, where 38 buildings collapsed killing scores of people, including more than 20 children at a school.

Pena Nieto went to the school as rescuers searched for children and adults trapped inside.

The death toll from Tuesday’s quake, which struck the capital and nearby states on the anniversary of a devastating 1985 tremor, has reached 230.

Politicians from all sides called for solidarity and praised how Mexicans, many of whom volunteered to help climb through rubble and search for survivors, had come together.

Nonetheless, one figure loomed large over the fallout from the quakes and any instability it may generate ahead of the July vote: leftist Andres Manuel Lopez Obrador, long the bete noire of Mexico’s political establishment and the frontrunner in many polls.

Lopez Obrador, or AMLO as he is known, enjoys widespread support in the left-leaning capital, home to about 20 million people.

The former Mexico City mayor, who narrowly lost the two previous presidential elections, won praise from supporters after the first quake when he proposed donating 20 percent of his party’s federal campaign funds for victims.

On Wednesday, volunteers across Mexico flocked to help remove debris and donate supplies in a grass-roots effort that opposition National Action Party (PAN) Senator Daniel Avila said was symptomatic of widespread distrust of the political class and the government’s ability to deliver.

“I think voters could look to punish those currently in government if they don’t manage this situation well,” Avila said.

MEMORIES OF ‘85

The PRI, which ran Mexico for an uninterrupted 71 years and currently places third in the polls, knows the political damage that earthquakes can inflict.

PRI President Miguel De La Madrid led the country during a powerful 1985 quake, which killed thousands in Mexico City exactly 32 years to the day before Tuesday’s tremor.

De La Madrid was widely criticized for his response, worsening already broad discontent with the party’s corrupt, authoritarian rule at the time. After the quake, the PRI gradually lost support and was voted out in 2000.

Now, party supporters hope that a swift response nationwide can avoid a repeat of that loss.

Governors from the PRI and its coalition partner the Green Party are in office in Oaxaca and Chiapas, the states hardest-hit by the first quake this month. And the PRI narrowly won a recent gubernatorial race in the State of Mexico, a longstanding party bastion where at least 12 people had died by Wednesday.

There have been accusations that aid has disproportionately benefited wealthier areas.

In the capital, fashionable districts like Roma and Condesa received most of the organized assistance. With a glut of people arriving to help and little guidance on how to best use resources, volunteers struggled, said 34-year-old art professor Camila Morales, adding that in poorer districts there had been insufficient help.

“On the outskirts in the south of the city ... there is no help arriving, they still don’t even have power,” said Morales, who was part of a large volunteer group from a local university.

On social media, a campaign emerged to prevent politicians from capitalizing on the earthquake.

Following Lopez Obrador’s lead, one petition sought to get the federal government to divert electoral funds for political parties to helping victims. Quickly, other politicians jumped on board.

Enrique Ochoa, the PRI chairman and one of the leftist’s fiercest critics, on Wednesday Tweeted: “I ask that the parties get together to resolve ... how we can donate campaign money, without pretense or opportunism.”