A 7.0 magnitude earthquake struck southwestern Mexico near the beach resort of Acapulco on Tuesday night, killing at last one person and shaking buildings in the capital several hundred kilometres away.
The epicentre was 11km south-east of Acapulco in Guerrero state, the National Seismological Service reported. It shook the hillsides around the resort, knocking down trees and pitching large boulders on to the road.
A man was killed when a utility pole fell on him in the nearby city of Coyuca de Benitez, Guerrero state governor Hector Astudillo said. President Andres Manuel Lopez Obrador said in a video message there were no reports of any significant destruction.
Acapulco is roughly 375km from Mexico City.
Tourists there evacuated hotels as dozens of aftershocks, including at least eight of magnitude 4 or above, rattled nerves.
"I was taking a bath and suddenly I felt a very strong movement and then I was scared and screamed," said a tourist from Mexico City who fled outside in only a bath towel.
In the Roma Sur neighbourhood of Mexico City, lights went off and scared residents rushed outside, some wearing little more than pyjamas, a witness said.
Residents huddled together in the rain, holding young children or pets, too worried to return to their homes in the dark.
"It was terrible," said Yesmin Rizk, 70, a Roma Sur resident. "It really reminds me of the 1985 quake every time something like this happens."
The United States Geological Survey aid the quake, initially measured at a magnitude of 7.4, was very shallow, only 12.5km below the surface, which would have amplified the shaking effect.
Authorities in Acapulco opened sports centres for people to sleep in if they were afraid to go home.
A church in the city of Chilpancingo offered refuge to families evacuated from housing that received structural damage, the Guerrero civil defence service said.
The earthquake was felt strongly in parts of Mexico City, sending residents and tourists spilling into the streets from homes and hotels.
There were no immediate reports of serious damage in the capital, Mexico City Mayor Claudia Sheinbaum said on Twitter.
Several neighbourhoods were left without power and the electricity board was working to restore it as soon as possible, she added.
Flashes of light were seen in the sky above the capital during the earthquake, which struck at a time when Mexico is facing a third wave of Covid-19 infections and severe flooding in some areas.
Bordered by the Atlantic and Pacific oceans, Mexico is one of the most seismically active places in the world, sitting on top of five tectonic plates including three major ones.