Mexican President Andres Manuel Lopez Obrador on Wednesday rejected any link between his austerity drive and a metro line disaster that left 25 dead, as devastated families began to bury the victims.

The tragedy that struck on Monday night, when a section of elevated track collapsed in the capital and brought a train full of passengers crashing down, has left the country in shock and mourning.

"I have no words to describe the pain," said 31-year-old Luis Adrian Hernandez.

"My father's dead and nobody can bring him back," he said, as the first funerals were held for the people who lost their lives, including a 12-year-old boy, Brandon Giovanny.

Mexico metro accident
'It was not an accident, it was negligence' reads the sign at the site of metro line crash in Mexico City Photo: AFP / CLAUDIO CRUZ

"Don't go, son!" his mother Marisol Tapia wailed as she clung to his coffin, on top of which stood a photo of the smiling schoolboy.

"He was a very happy child," said Brandon's father, Pedro Hernandez.

"What happened is horrible. I don't wish it on anyone," he added.

Foreign governments offered condolences, including US President Joe Biden, who said his country was "ready to assist Mexico as it rebuilds from this tragedy."

Mexico metro accident
Relatives carry a coffin with the remains of Juan Luis Diaz Galicia, who was among the victims Photo: AFP / PEDRO PARDO

As allegations of administrative mismanagement of the line mounted, Lopez Obrador rejected suggestions from employers' association Coparmex that the accident was linked to public spending cuts.

"The metro maintenance has a sufficient budget. It's authorized by Mexico City's legislative assembly. What does that have to do with austerity?" the left-wing populist said.

He accused Coparmex of being part of the conservative opposition.

Yet an investigation being carried out by prosecutors and Norwegian engineering company DNV could bring more awkward questions for a president who has promised to fight deep-rooted corruption.

Mexico metro accident
People attend the wake of 12-year-old Brandon Giovanny Hernandez Tapia who died in the metro disaster Photo: AFP / CLAUDIO CRUZ

The authorities have also come under fire from one of the metro labor unions, which said that its earlier warning about damage to the overpass that collapsed was ignored.

"The workers are afraid, we have no guarantees," union leader Jesus Urban told the Milenio newspaper.

Mexico metro accident
Rescue workers use cranes to remove the wreckage of a metro train that fell as an overpass collapsed in Mexico City Photo: AFP / CLAUDIO CRUZ

The fallout from the disaster has thrust two of Lopez Obrador's potential political heirs into the eye of a growing political storm.

In his former position as Mexico City mayor, Foreign Minister Marcelo Ebrard oversaw the development and inauguration of the line involved in the crash.

Incumbent Mayor Claudia Sheinbaum meanwhile faces questions about whether the network has been adequately maintained.

Both of them are considered top contenders to be the candidate of Lopez Obrador's Morena party to run in the 2024 presidential elections.

The metro disaster is "being used for a political bashing," analyst Hernan Gomez Bruera told AFP, referring to accusations being made against the pair by opponents and newspaper columnists.

The incident has reignited controversy over major overruns in the metro line's construction cost -- which finally amounted to around $1.2 billion -- and a string of structural problems.

The line "was Ebrard's jewel, but it has shattered," political analyst Martha Anaya told AFP.

Ebrard has said that his own administrative responsibility for the project ended in 2013.

He has promised to cooperate fully with the investigation into the accident, saying the accusations against him are politically motivated.

Gomez Bruera thinks the probe should scrutinize Ebrard's successor as mayor, Miguel Angel Mancera, and his decision to reopen the line after partially suspending it in 2014 for repairs.

"Sheinbaum also had two and a half years to check the structure. There were complaints from residents of problems and she should have done an exhaustive review," he said.

The accident comes just a month before June 6 midterm legislative elections in which Lopez Obrador's party aims to retain control of the lower house of Congress.

Experts said, however, that Lopez Obrador and his party seemed unlikely to suffer a major setback in the short term thanks to his approval rating of more than 60 percent.

"Morena is still strong thanks to Lopez Obrador's image," said Gomez Bruera.

Copyright AFP. All rights reserved.