One of the most powerful earthquakes ever recorded in Mexico struck off the country's southern coast, toppling hundreds of buildings, triggering tsunami evacuations, and sending panicked people fleeing into the streets in the middle of the night. At least 32 people were reported killed.
The quake that hit late Thursday was strong enough to cause buildings to sway violently in the capital city more than 650 miles away. As beds banged against walls, people still wearing pajamas ran out of their homes and gathered in frightened groups.
Rodrigo Soberanes, who lives near San Cristobal de las Casas in Chiapas, the state nearest the epicenter, said his house "moved like chewing gum."
The furious shaking created a second national emergency for Mexican agencies already bracing for hurricane Katia on the other side of the country. The system was expected to strike the Gulf coast in the state of Veracruz as early Saturday as a Category 2 storm that could bring life-threatening floods.
The worst-hit city appeared to be Juchitan, on the narrow waist of Oaxaca known as the Isthmus. Video from the scene showed that about half of the city hall collapsed in a pile of rubble. Local officials said at least 17 of the 32 dead were in Juchitan.
The capital escaped major damage, but the quake terrified sleeping residents, many of whom still remember the catastrophic 1985 earthquake that killed thousands and devastated large parts of the city.
Families were jerked awake by the howling shriek of the capital's seismic alarm. Some shouted as they dashed out of rocking apartment buildings. Even the iconic Angel of Independent Monument swayed as the quake's waves rolled through the city's soft soil.
Elsewhere, the extent of destruction was still emerging. Hundreds of buildings collapsed or were damaged, power was cut at least briefly to more than 1.8 million people and authorities closed schools Friday in at least 11 states to check them for safety.
The earthquake hit off Chiapas state near the Guatemalan border with a magnitude of 8.1 – equal to Mexico's strongest of the past century. It was slightly stronger than the 1985 quake, the US Geological Survey said.
The epicenter was in a seismic hotspot in the Pacific where one tectonic plate dives under another. These so-called subduction zones are responsible for producing some of the biggest quakes in history, including the 2011 Fukushima disaster and the 2004 Sumatra quake that spawned a deadly tsunami.
Oaxaca state Gov. Alejandro Murat told local news media that at least 23 people had died in his coastal state. Civil defense officials said at least seven died in Chiapas and two others in the Gulf coast state of Tabasco.
The USGS recorded at least 20 aftershocks of magnitude 4.0 or greater within about five hours of the main shake, and the president warned that a major aftershock as large as magnitude 7.2 could occur.
The quake struck at 11:49 p.m. Thursday, and its epicenter was 102 miles west of Tapachula in Chiapas. It had a depth of 43.3 miles, the USGS said.
Chiapas Gov. Manuel Velasco said that three people were killed in San Cristobal, including two women who died when a house and a wall collapsed. He called on people living near the coast to leave their houses as a protective measure.
"There is damage to hospitals that have lost energy," he said. "Homes, schools and hospitals have been damaged."
Tabasco Gov. Arturo Nunez said one child died when a wall collapsed, and an infant died in a children's hospital when the facility lost electricity, cutting off the ventilator.
The Pacific Tsunami Warning Center said waves of 3.3 feet above the tide level were measured off Salina Cruz, Mexico. Smaller tsunami waves were observed on the coast or measured by ocean gauges in several other places. The center's forecast said Ecuador, El Salvador and Guatemala could see waves of a meter or less. No threat was posed to Hawaii or the western and South Pacific.
Authorities said they were evacuating some residents of coastal Tonala and Puerto Madero because of the warning.
In neighboring Guatemala, President Jimmy Morales appeared on national television to call for calm while emergency crews surveyed damage. He said one unconfirmed death occurred in San Marcos state near the border with Mexico.
The quake occurred near the point of collision between three tectonic plates, the Cocos, the Caribbean and the North American.
The area has seen at least six other quakes of magnitude 7.0 or greater since 1900. Three of those occurred within a nerve-wracking nine-month span in 1902-1903, according to Mexico's National Seismological Service.
Scientists were still reviewing data, but a preliminary analysis indicated the quake was triggered by the sudden breaking or bending of the Cocos plate, which dives beneath Mexico. That type of process does not happen often in subduction zones. Usually, big quakes in subduction zones occur along the boundary between the sinking slab and the overriding crust.
"It's unusual, but it's not unheard of," said seismologist Susan Hough of the USGS, describing how stresses on the seafloor can produce big earthquakes.
The new quake matched the force of a magnitude 8.1 quake that hit the country on June 3, 1932, roughly 300 miles west of Mexico City.
A study by the seismological service concluded that that quake killed about 400 people and caused severe damage around the port of Manzanillo. A powerful aftershock that hit 19 days later caused a tsunami that devastated 15 miles of coastline, killing 75 people.
The story is reported by The Associated Press. Frank Griffiths in London contributed to this report.