At least five people have died after a massive 8.1-magnitude earthquake struck off the coast of southern Mexico, toppling houses in Chiapas state, causing buildings to sway violently as far away as the country's distant capital and setting off a tsunami warning.
The governor of Tabasco state Arturo Nunez said that one child died when a wall collapsed, and a baby died in a children's hospital that lost electricity, cutting off the supply to the infant's ventilator.
The other three deaths were in Chiapas state, in San Cristobal de las Casas.
The quake was so strong that it caused buildings to sway violently in Mexico's capital, more than 650 miles away.
Residents fled buildings, many in their pyjamas, and gathered in frightened groups in the street. Some neighbourhoods remained in darkness after electricity was knocked out.
The US Geological Survey said the quake struck at 11.49pm local time on Thursday and its epicentre was 102 miles west of Tapachula in Chiapas, not far from Guatemala. It had a depth of 22 miles.
The US Tsunami Warning System said hazardous tsunami waves were possible on the Pacific coasts of several Central American countries, including Guatemala, El Salvador, Costa Rica, Nicaragua, Panama and Honduras, within three hours.
"The house moved like chewing gum and the light and internet went out momentarily," said Rodrigo Soberanes, who lives near San Cristobal de las Casas, a poor, largely indigenous state popular with tourists.
Chiapas governor Manuel Velasco urged people living near the coast to leave their homes as a protective measure.
"There are damages in hospitals that have lost energy," he said. "Homes, schools and hospitals have been damaged."
Chiapas Civil Defence said on its Twitter account that its personnel were in the streets aiding people and warned residents to prepare for aftershocks.
In neighbouring Guatemala, President Jimmy Morales spoke on national television to call for calm while emergency crews checked for damage.
"We have reports of some damage and the death of one person, even though we still don't have details," Mr Morales said, adding that the unconfirmed death occurred in San Marcos state near the border with Mexico.
Lucy Jones, a seismologist in California who works with the US Geological Survey, said such a quake was to be expected.
"Off the west coast of Mexico is what's called the subduction zone, the Pacific Plate is moving under the Mexican peninsula," she said. "It's a very flat fault, so it's a place that has big earthquakes relatively often because of that."
"There's likely to be a small tsunami going to the south-west. It's not going to be coming up and affecting California or Hawaii," she said. "For tsunami generation, an eight is relatively small."
The Pacific Tsunami Warning Centre said waves of one metre (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 centre's forecast said Ecuador, El Salvador and Gu