An eight-year-old girl has been rescued after she spent 33 hours under the rubble of a building that collapsed during a devastating earthquake in Mexico.

A violent 7.1-magnitude quake struck central Mexico on Tuesday (19 September), killing at least 230 people and destroying several buildings. The death toll is expected to rise, and search and rescue operations are ongoing.

The girl was found on Wednesday (20 September) evening in Tlalpan, a borough in the capital Mexican City.

Federal police, military and rescue workers had gathered around the remains of the C1 apartment complex, hoping for a miracle, Mexican news site Animal Politico reported. The complex was inhabited by some 30 people, the majority of whom were pensioners.

Rescue workers also recovered the corpses of five people. It is not clear how many residents survived.

Another three people, two women and one man, were rescued from the rubble of another collapsed building in the area.

The majority of the earthquake's victims died in Mexico City. At least 25 people, the majority of whom were children, died when a three-storey school building collapsed during the quake. All but four of the bodies were of children.

President Enrique Peña Nieto has declared three days of national mourning and visited some of the areas affected.

The devastating quake took place as people marked the 32nd anniversary of the country's deadliest tremor, an 8.1-magnitude earthquake that killed nearly 10,000 people in the capital in 1985.

The country held its annual earthquake drill just two hours before the tremor struck.

This year, five states opted not to take part in the drill to pay respect to those who were still recovering from an 8.1 magnitude earthquake that struck off the country's southern coast on 7 September.

That quake killed dozens of people, triggered tsunamis, and sent shockwaves as far as Mexico City and Guatemala City.

Mexico City earthquake
Rescuers and residents assist an injured victim amid the ruins of a building Hector Vivas/Getty Images