The 8.1 magnitude quake late on Thursday (local time) was stronger than a devastating 1985 temblor that flattened swathes of Mexico City and killed thousands.
This time damage to the city was limited as the quake was deeper and further from the capital.
Elsewhere in the country, the quake tore through buildings, forced mass evacuations and triggered alerts as far away as Southeast Asia.
"It almost knocked me over," said Gildardo Arenas Rios, a 64-year-old security guard in Mexico City's Juarez neighborhood, who was making his rounds when buildings began moving.