A 12-year-old girl trapped in a collapsed school building – who had become symbol of hope in earthquake-devastated Mexico City – does not exist, officials have said.

The news came as rescue teams worked to free students and teachers trapped in the elementary school, which crumbled after a 7.1 magnitude earthquake struck this week. After more than 30 hours of work, the Mexican Navy announced that all children at the school had been accounted for.

A single, adult school worker may still be alive inside the building, Navy Assistant Secretary Angel Enrique Sarmiento told reporters.

But as for the 12-year-old girl still trapped in the rubble? "We’ve never had any knowledge of this version,” he said.

The announcement left many wondering what had happened to “Frida Sofia,” the name given to the schoolgirl who rescue workers said they had made contact with from inside the building.

Workers said they had spotted the girl’s hand poking out from the rubble on Wednesday. When they called out to see if she was alive, they said, she waved her hand in response.

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

At one point, Mexican broadcaster Televisa reported that the girl had alerted rescue workers to four more people who were trapped around her. Thermal imaging also indicated that four more people might still be inside the school, a volunteer worker told the Associated Press.

Mr Sarmiento pushed back against these reports on Thursday.

"We have done an accounting with school officials and we are certain that all the children either died, unfortunately, are in hospitals, or are safe at their homes," he said.

Mexico earthquake: Many die in school collapse

Rescuers tunnelled into the collapsed school building on Wednesday and Thursday, looking for trapped students and teachers. Volunteers crowded around to remove debris by the bucketful. Often, the work proceeded in complete silence, allowing workers to better hear any calls for help.

As television crews broadcast the efforts, hoping to catch 'Frida Sofia's" heroic rescue, workers pulled the lifeless body of a 58-year-old school worker out of the wreckage.

All told, 19 children and six adults died in the building, Mr Sarmiento said. Eleven were safely rescued.

Rumors circulated widely among anxious family members during the days-long rescue. Some parents told a local newspaper that they had received WhatsApp messages from children trapped in the building, though the reports could not be confirmed.

Family members for "Frida Sofia," however, never materialised.

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

A local university worker told Reuters he’d volunteered at the rescue site overnight, helping to clear the wreckage. The man, Vladimir Navarro, said the rescue workers were "just meters away from getting to the children," but had to be painstakingly careful in the unstable rubble.

"Taking any decision is dangerous,” Mr Navarro said.

Another volunteer, Pedro Serrano, described digging his way into a collapsed classroom.

“We saw some chairs and wooden tables,” he told the AP. “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.

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

The earthquake that destroyed the school building killed an estimated 245 people across the country, and injured more than 2,000. It was the second major earthquake to hit Mexico in less than two weeks.

Rescue workers saved more than 50 people from crumbled buildings in the days following the quake, Mexican President Enrique Peña Nieto said. In some areas, volunteers formed human chains spanning several city blocks to pass rubble away from rescue sites.