Televisa television network quoted Mexico City officials saying there were no immediate reports of damage or injuries.
The quake rattled nerves in a city already nervous about a swine flu outbreak suspected of killing as many as 149 people nationwide.
"I'm scared," said Sarai Luna Pajas, a 22-year-old social services worker standing outside her office building moments after it hit. "We Mexicans are not used to living with so much fear, but all that is happening — the economic crisis , the illnesses and now this — it feels like the Apocalypse."
Co-worker Harold Gutierrez, 21, said the country was taking comfort from its religious faith, but he too was gripped by the sensation that the world might be coming to an end.
"If it is, it is God's plan," Gutierrez