A massive earthquake struck off the southern coast of Mexico late Thursday and was felt as far away as Mexico City, where residents fled violently swaying buildings and electrical transformers exploded.
The Mexican Seismological Institute said the earthquake measured 8.4 in magnitude, making it the most powerful to strike Mexico since the disastrous earthquake of 1985, which caused extensive damage in Mexico City and left at least 5,000 people dead.
The epicenter of Thursday's earthquake was about 60 miles off the coast of Chiapas state, near the border with Guatemala, according to the United States Geological Survey, which measured the quake's magnitude at 8.1.
The National Weather Service's Pacific Tsunami Warning Center warned that tsunami waves as high as 9 feet might hit along Mexico's Pacific coast.
Tsunami waves of 2.3 feet were observed in Huatulco, a resort city in Mexico's Oaxaca state, and 3.3 feet at Salina Cruz, according to the center.
The earthquake struck at 9:49 p.m. Pacific time Thursday. The shaking toppled houses in Chiapas state, and was felt in El Salvador, Honduras and Guatemala.
Five deaths were reported throughout Mexico as of Friday morning. 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, according to the Associated Press.
Tabasco Gov. Arturo Nunez said two children had died in his 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.
Interior Minister Miguel Osorio Chong said school would be canceled Friday in Chiapas and in Mexico City.
The quake was felt powerfully in Mexico City, where buildings shook for about a minute and the sky lit up as electrical transformers exploded. Residents — many barefoot and dressed in pajamas — fled swaying apartment buildings, seeking safer ground in the streets.
Some had left their homes a few minutes earlier as a precaution when earthquake warning sirens sounded throughout the city, which is notoriously vulnerable to earthquake damage because of its location on top of a former lake bed.
Mexico City Mayor Miguel Angel Mancera told Televisa news channel there were electrical outages in parts of the city but no reports of collapsed buildings or deaths.
The quake struck about 460 miles south of Mexico City, said USGS geophysicist Robert Sanders. That's twice as far away from the capital as the 1985 earthquake, of a magnitude of 8.1, that caused more than 400 multistory buildings to collapse.
It is a region that is no stranger to seismic activity. About 150 miles to the southeast of Thursday's epicenter, a magnitude 7.4 earthquake struck in 2012 off the coast of Guatemala. At least 48 people died and 150 were injured in that earthquake, and there was significant damage along the coast, the USGS said.
An aftershock with a magnitude of 5.7 and an epicenter about 50 miles to the northwest of the first quake hit 12 minutes after Thursday's temblor, the Mexican Seismological Institute said.
USGS geophysicist Jessica Turner said the destruction would have been worse if the earthquake had struck closer to the coast.
"There may be some damage closer to the epicenter, but it's pretty far away from the mainland," Turner said.
The earthquake struck in the general area of the Middle America Trench, an oceanic trench in the eastern Pacific Ocean in which the Cocos tectonic plate is sliding under the North American plate at an average speed of about 3 inches a year, said USGS geophysicist Randy Baldwin.
As tension builds up over the years, earthquakes can happen. The preliminary estimate is that the earthquake struck about 43 miles beneath the surface, which is considered a relatively shallow earthquake.
"Certainly, an 8.1 earthquake is sizable enough where it's going to generate potentially damaging surface waves," Baldwin said.
The Mexico earthquake was too far away to trigger an earthquake in California, seismologist Lucy Jones said in a tweet. But the Mexico earthquake does not make an earthquake in California, which is thought to be due for a major earthquake, less likely.
Linthicum reported from Mexico City; Lin from Los Angeles. Special correspondent Cecilia Sanchez in Mexico City contributed to this report.
2:55 a.m.: Updated to add three additional deaths, bring the death toll to 5.
12:10 a.m.: The story was updated with a report of an additional tsunami and details of past earthquake activity in the area.
11:45 p.m.: The story was updated with reports of two deaths in Chiapas state.
11:30 p.m.: The story was updated with additional details on the quake and its effects in Mexico City and southern Mexico.