A powerful earthquake of magnitude 7.4 struck the coast of southern Mexico, killing at least one person, buckling paved roads, and sending people fleeing their homes into the streets.
At least four people have died in the state of Oaxaca, after the quake hit the Pacific coastal state mid-morning.
Mexico's civil protection agency recommended that residents move away from the coastline to avoid a possible tsunami. Videos on social media showed the ocean's water receding in Oaxaca, a mountainous state that is home to coffee plantations, beach resorts, and Spanish colonial architecture.
"We couldn't walk... the street was like chewing gum," said Miguel Candelaria, 30, who was working at his computer in his family home in the Oaxaca town of Juchitan when the ground began to tremble.
He said he ran outside with relatives, but they had to stop in the middle of the street as the pavement buckled and rocked.
Neighbours screamed in terror and some shouted out warnings to run from the electricity poles that looked poised to fall, said Candelaria, who works in telecommunications marketing.
Quakes of magnitudes over 7 are major earthquakes capable of widespread, heavy damage. A 7.1 magnitude earthquake that struck central Mexico in 2017 killed 355 people in the capital and the surrounding states.
Tuesday's quake set off a tsunami warning for the Pacific coasts of Mexico and Central and South America. Waves of up to 1m were possible on the Mexican coast, the US National Oceanic and Atmospheric Administration warned.
Buildings shook in Mexico City, hundreds of kilometres away. The capital's public security ministry said a flyover showed "there are no fallen buildings."
The US Geological Survey said the epicentre of Tuesday's quake was located 69km northeast of the town of Pochutla, near the Huatulco beach resort area that is popular with U.S. and Canadian tourists.
It was very shallow, only 26km below the earth's surface, which would have amplified the shaking.