The magnitude-7.4 earthquake near Huatulco, Oaxaca caused rockfalls, and damaged buildings in hillside villages.
A powerful earthquake centred near the southern Mexico resort of Huatulco killed at least four, swayed buildings in Mexico City nearly 700 kilometres (435 miles) away and sent thousands fleeing into the streets.
Mexico’s civil protection agency said the death toll from the earthquake was four.
The fatalities were near the quake’s epicentre in the mountainous state, Oaxaca – known for its coffee, mescal and Spanish colonial architecture.
Rockfalls blocked the winding mountain roads between the state capital of Oaxaca City and the coast. A clinic and other buildings in hill villages near the epicentre were severely damaged, images on social media showed.
The dead included a worker from state oil company Pemex, who suffered a bad fall, Mexico’s civil protection agency said. Pemex was forced to briefly shutter the country’s biggest oil refinery in Oaxaca.
Mexico President Andres Manuel Lopez Obrador said a building collapse in Huatulco killed one person and injured another.
Ports, airports and refineries were not damaged, he said in a video-recorded phone conversation with his civil defence chief. There had been more than 140 aftershocks, most of them small.
Seismic alarms sounded midmorning with enough warning for residents to exit buildings. Power was knocked out to some areas.
Helicopters flew over downtown Mexico City, and police patrols sounded their sirens.
Groups of people still milled around in close proximity on streets and sidewalks in some neighbourhoods of the capital about an hour after the quake. Many were not wearing masks, despite past appeals from municipal officials for them to do so as a way to curb the spread of the new coronavirus.
The US Geological Survey said the magnitude-7.4 quake hit at 10:29am local time (15:29GMT) along Mexico’s southern Pacific coast at a depth of 26km (16 miles). The epicentre was 12km (seven miles) south-southwest of Santa Maria Zapotitlan in Oaxaca state.