Volunteers in Mexico City have formed a human chain spanning four city blocks to rescue those trapped in the wreckage of an apartment building that collapsed following a massive earthquake, one of a number of rescue efforts across the city

The 7.1 magnitude earthquake that hit the city on Tuesday decimated around 40 buildings, Mexico City Mayor Miguel Angel Mancera said. The shocks have already caused at least 230 deaths – 100 of them in the capital city alone.

At the site of one collapsed apartment building, dozens of volunteers formed an assembly line to pass rubble out of the area. At another building, volunteers linked up to pass a stretcher to rescue workers.

One man, an army reservist named Manuel Mavroleon Aguayo, told the BBC he had joined a team that pulled seven bodies out of a ruined building. Only two survived.

“A huge wave of people emerged out of where they were to help with the rescue effort,” Mr Aguayo said.

A total of 52 people have been saved from collapsed buildings so far, according to the Mexico City government. The city's Social Development Department tweeted the number Wednesday afternoon and added: "We won't stop."

At a Mexico City primary and secondary school - called the Enrique Rebsamen school - rescue workers and volunteers worked into the night, illuminated by floodlights, to dig out those trapped inside. The teams used dogs, cameras and heat-seeking equipment to detect survivors.

One volunteer, Pedro Serrano, told AP he had dug his way into a collapsed classroom.

“We saw some chairs and wooden tables,” he recalled. “The next thing we saw was a leg, and then we started to move rubble and we found a girl and two adults – a woman and a man.”

All three of them had died.

Mexico City earthquake in pictures Show all 13 1 /13 Mexico City earthquake in pictures Mexico City earthquake in pictures A handout picture provided by the citizen Edgar Cabalceta shows a general view of Mexico City following a magnitude 7.1 earthquake, in Mexico City, Mexico EPA Mexico City earthquake in pictures Rescuers and residents look for victims amid the ruins of a building knocked down by a magnitude 7.1 earthquake that jolted central Mexico damaging buildings, knocking out power and causing alarm throughout the capital on September 19, 2017 in Mexico City, Mexico. The earthquake comes 32 years after a magnitude-8.0 earthquake hit on September 19, 1985 Getty Images Mexico City earthquake in pictures A police officer stands guard near a building which collapsed after a quake rattled Mexico City RONALDO SCHEMIDT/AFP/Getty Images Mexico City earthquake in pictures Rescuers, firefighters, policemen, soldiers and volunteers remove rubble and debris from a flattened building in search of survivors after a powerful quake in Mexico City AFP/Getty Images Mexico City earthquake in pictures Rescuers and residents look for victims amid the ruins of a building knocked down by a magnitude 7.1 earthquake that jolted central Mexico damaging buildings, knocking out power and causing alarm throughout the capital on September 19, 2017 in Mexico City Getty Images Mexico City earthquake in pictures People try to rescue survivors from a collapsed buildings after a magnitude 7.1 earthquake on the Richter scale in Mexico City, Mexico, 19 September 2017. At least 79 people lost their lives in the states of Morelos, Puebla and Mexico by the earthquake of magnitude 7.1 on the Richter scale. EPA Mexico City earthquake in pictures People clear rubble after an earthquake hit Mexico City, Mexico REUTERS Mexico City earthquake in pictures People clear rubble after an earthquake hit Mexico City, Mexico REUTERS Mexico City earthquake in pictures Rescuers and residents assists an injured victim amid the ruins of a building knocked down by a magnitude 7.1 earthquake that jolted central Mexico damaging buildings, knocking out power and causing alarm throughout the capital on September 19, 2017 in Mexico City, Mexico. The earthquake comes 32 years after a magnitude-8.0 earthquake hit on September 19, 1985. Getty Images Mexico City earthquake in pictures People remove debris outside a collapsed building after an earthquake in Mexico City, Mexico REUTERS Mexico City earthquake in pictures People remove debris as they search for possible victims after a quake rattled Mexico City on September 19, 2017. A powerful earthquake shook Mexico City on Tuesday, causing panic among the megalopolis' 20 million inhabitants on the 32nd anniversary of a devastating 1985 quake. The US Geological Survey put the quake's magnitude at 7.1 while Mexico's Seismological Institute said it measured 6.8 on its scale. The institute said the quake's epicenter was seven kilometers west of Chiautla de Tapia, in the neighboring state of Puebla. AFP/Getty Images Mexico City earthquake in pictures A security guard walks over debris of a building which collapsed during a quake in Mexico City AFP/Getty Mexico City earthquake in pictures Reconstruction work in the towns affected by the telic movement has begun. Several temples suffered severe damage. Rex

Rescue workers were able to save 11 people at the school by Wednesday afternoon, but a number more were still unaccounted for. A teacher and two students had sent text messages from inside the decimated building, workers said.

Twenty-one children and four adults have already been reported dead, with the rescue efforts at the school becoming national news.

One young girl was saved when rescuers spotted her and yelled out to her to shake her hand if she was alive. Other parents were left waiting to wonder if their children would ever be found.

"They keep pulling kids out, but we know nothing of my daughter," 32-year-old Adriana D'Fargo told Reuters. She had been waiting for hours for news of her seven-year-old.

Late in the day there were reports of another potential rescue of the school - with rescuers calling for paramedics. Two young students were reported to have been found.

Luis Carlos Herrera Tome, a 12-year-old who had attended the school for eight years was one of those to escape, returning on Wednesday to try and help.

Hugs were offered and accepted, but Luis Carlos felt helpless outside the security barriers playing the events of the previous day back.

He told the AP that he was in English class Tuesday when everything started moving. He headed for the door leaving his backpack, books, pencils and everything behind.

First he turned to the school's main staircase, a concrete structure toward the front of the building. “I saw that the ceiling started to break apart so I turned around,” he said.

“I grabbed my friends and we took off running,” he added, showing how they linked arms.

The students who exited with Luis Carlos quickly realised they were trapped even once outside. Residents of a neighbouring apartment building broke through a fence atop a tall wall separating the properties and lowered a ladder so the students could climb out.

Rescue workers search for children trapped inside the collapsed Enrique Rebsamen school in Mexico City (Carlos Cisneros/AP)

Elsewhere in the city, two sisters joined a chain passing water to those trapped inside a collapsed six-storey office building. Fears of gas leaks have forced many restaurants and grocery stores to remain closed, but witnesses say residents have generously shared what supplies they have.

One of the sisters, Cristina Lopez, told AP it was “human nature that drives everyone to come and help others”.

“We are young. We didn’t live through ’85,” her sister added, referencing Mexico’s deadliest earthquake to date. “But we know that it’s important to come out into the streets to help.”

Rescue workers search for people under the rubble of a collapsed building after an earthquake hit Mexico City (Reuters)

In an eerie coincidence, Tuesday’s earthquake occurred on the 32nd anniversary of the 1985 quake. It also came on the heels of another, more powerful earthquake that struck the city less than two weeks before.

This latest quake was less powerful, but has already proved more fatal. Tuesday’s shocks struck closer to the capital, which is especially sensitive because it was built on the soft earth of a lake bed.

In addition to the 100 people who died in the capital, 69 people have been reported dead in the neighbouring Morelos state, 43 in Puebla, 13 in the State of Mexico, four in Guerrero and one in Oaxaca. Determining the number of casualties has been complicated by the variety of places where the earthquake hit, National Civil Defense Coordinator Luis Felipe Puente said.

Mexico earthquake: More than 217 confirmed dead

Mexican President Enrique Pena Nieto has declared three days of national mourning to honour the victims, writing on Twitter: "Mexico shares your pain."

Foreign governments have started identifying the foreign nationals among the victims. Spain’s Ministry of Foreign Affairs said one Spanish citizen had been identified, but officials declined to give more details.

Spanish Prime Minister Mariano Rajoy send a telegram to Mexico on Wednesday, offering his country’s help in the recovery efforts. Israeli Prime Minister Benjamin Netanyahu has also said he will send a 70-member rescue team to assist.

US President Donald Trump, taking a break from his United Nations debut, tweeted his sympathy.