An elevated metro line collapsed in the Mexican capital on Monday, leaving at least 23 people dead and dozens injured as a passing train came crashing down, authorities said.

Security camera footage broadcast by local media showed the carriages plunging towards the ground in the south of the city.

"Unfortunately there are 20 people dead so far," including minors, Mexico City Mayor Claudia Sheinbaum told reporters at the scene in the south of the capital.

The city's civil defense department said on Twitter that around 70 others were injured in the dramatic accident.

Dozens of emergency workers were seen trying to rescue victims from the carriages.

Footage shared on social media by an emergency response team appears to show rescuers attempting to prise the doors of the metro train open, which can be seen dangling mid-air from the bridge:

But the work later had to be suspended because of fears the wreckage was too unstable.

"For now the rescue has been suspended because the train is very weak. A crane is coming to continue" the work, Sheinbaum said.

Part of the train was hanging from the tracks in a tangle of twisted cables with the front ends of two carriages pointing towards the ground in a V-shape.

A car was trapped under the rubble, but it was unknown if there were people inside.

"Suddenly I saw that the structure was shaking," an unidentified witness told the Mexican television network Televisa.

"When the dust cleared we ran... to see if we could help. There were no screams. I don't know if they were in shock," she added.

Medics were seen taking the injured away on stretchers.

The casualties were rushed to different hospitals in the city, Sheinbaum said.

The accident occurred when a section of the elevated tracks collapsed at the Olivos station at around 10 pm (0300 GMT), she said.

SUUMA, a volunteer first aid and responder force in the city, shared images from the scene:

The Mexico City subway has 12 lines and carries millions of passengers each day.

Monday's accident comes just over a year after two subway trains collided in Mexico City, leaving one dead and around 40 injured as panicked passengers escaped through dense smoke.

In another incident in January of this year, one person died and 29 suffered smoke inhalation injuries in a fire in the metro's control center.

The latest accident comes at a time when Mexico is struggling to cope with the coronavirus pandemic, which has left more than 217,000 people dead in the country -- one of the world's highest tolls.

Deadliest metro accidents since 1975

- July 15, 2014 - RUSSIA: At least 22 people die and more than 200 are injured after a train derails on Moscow's packed metro during the rush hour.

- June 22, 2009 - UNITED STATES: A head-on collision between two subway trains in Washington leaves nine people dead and more than 70 injured.

- July 3, 2006 - SPAIN: In the eastern city of Valencia, a metro train traveling at twice the speed limit of 40 kilometers (25 miles) an hour derails, leaving 43 dead and 39 injured.

- February 18, 2003 - SOUTH KOREA: A fire started by a man trying to commit suicide destroys two metro trains, killing 198 and injuring 147 in Daegu, in the southeast.

- October 28, 1995 - AZERBAIJAN: 292 people die and 168 are injured when a fire breaks out on the Baku metro when a train is between two stations.

- November 18, 1987 - BRITAIN: A fire on a wooden escalator in London's King's Cross underground station kills 31 and injures 150.

- February 4, 1977 - UNITED STATES: In Chicago, an elevated railway train topples on to the street below after being hit by another train. Eleven are killed and more than 200 injured.

- October 20, 1975 - MEXICO: In Mexico City, two metro trains ram into each other leaving 23 dead and 55 injured.