A 7.0 magnitude earthquake struck southwestern Mexico near the beach resort of Acapulco on Tuesday night, although there were no immediate reports of casualties.
The powerful quake struck 11 miles northeast of the resort of Acapulco, Guerrero, Reuters reported the US Geological Survey (USGS) as saying. It shook the hillsides around Acapulco, downing trees and pitching large boulders onto the road.
Hector Astudillo, the governor of Guerrero state, and Mexico City Mayor Claudia Sheinbaum said there were currently no reports of serious damage.
Acapulco is roughly 375km from Mexico City.
In the Roma Sur neighborhood of Mexico City, lights went off and scared residents rushed outside, some wearing little more than pajamas, 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 USGS said 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.