Update 9.45pm:At least 58 people have been killed after one of the most powerful earthquakes ever recorded in Mexico struck off the country's southern coast.
The quake, which hit minutes before midnight on Thursday, toppled hundreds of buildings, triggered tsunami evacuations and sent panicked people fleeing into the streets in the middle of the night.
It was strong enough to cause buildings to sway violently in the capital city more than 650 miles away.
People still wearing pyjamas 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 epicentre, 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 early on Saturday as a category two storm that could bring life-threatening floods.
The head of Mexico's civil defence agency confirmed the deaths of 45 people in the southern state of Oaxaca.
Another 10 people died in Chiapas and three more in the Gulf coast state of Tabasco.
The worst-hit city appeared to be Juchitan, on the narrow waist of Oaxaca known as the Isthmus.
About half of the city hall collapsed in a pile of rubble, and streets were littered with the debris of ruined houses.
Mexico's 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.
Earlier: One of the most powerful earthquakes ever to strike Mexico has killed at least 32 people, toppling houses and businesses and sending panicked people into the streets more than 650 miles away.
Oaxaca state governor Alejandro Murat told local media that at least 23 people in his state died, and civil defence officials said at least seven died in the state of Chiapas, which borders Guatemala, while two died in the Gulf coast state of Tabasco.
The US Geological Survey said the earthquake hit off southern Chiapas state near the Guatemalan border with a magnitude as 8.1 - equal in force to a 1985 quake that killed thousands and devastated large parts of Mexico City.
Hundreds of buildings collapsed or were damaged, power was cut to more than 1.8 million people and authorities closed schools in at least 11 states for safety checks.
The US Geological Survey recorded at least 20 aftershocks of magnitude 4.0 or greater within about five hours, and the president warned that a major aftershock as large as magnitude 7.2 could occur.
The USGS said the quake struck at 11.49pm on Thursday and its epicentre was 102 miles west of Tapachula in Chiapas. It had a depth of 43.3 miles.
The quake caused buildings to sway violently in Mexico's capital more than 650 miles away, and people still wearing nightclothes fled into the streets, gathering in frightened groups.
Chiapas governor Manuel Velasco said 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 governor Arturo Nunez said two children died in his Gulf coast state. One of them was killed when a wall collapsed, and the other was a baby who died in a children's hospital that lost electricity, cutting off the infant's ventilator.
The Pacific Tsunami Warning Centre said waves more than 3ft 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 Guatemala could see waves of 3ft. No threat was posed to Hawaii and the western and South Pacific.
Mexican authorities were evacuating some residents of coastal Tonala and Puerto Madero because of the warning.
The quake hit as emergency agencies were bracing for another crisis on the other side of the country. The US National Hurricane Centre said Hurricane Katia is likely to strike the Gulf coast in the state of Veracruz early on Saturday as a category two storm that could bring life-threatening floods.
In neighboring 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. He said the unconfirmed death occurred in San Marcos state near the border with Mexico.
The quake occurred in a seismically active region near the point of collision between three tectonic plates, the Cocos, the Caribbean and the North American.
Mexico's National Seismological Service said the area has seen at least six other quakes of magnitude 7.0 or greater since 1900 - though three of those occurred within a nerve-wracking nine-month span in 1902/03.