The quake struck just before 12:30 a.m. about 14 miles west of Jolalpan, Mexico, and 76 miles south of Mexico City, U.S. Geological Survey reported.
In Mexico City, tall buildings swayed, sending many people into the streets, the Los Angeles Times reported. Electricity and cell phone service were knocked out in parts of the city as well.
Mexico City Mayor Miguel Angel Mancera said there were no reports of serious damage in the city and Interior Minister Miguel Angel Osorio Chong also said there were no reports of damage nationwide.
There were also no reports of injuries.
Exploding whale video goes viral on Internet
Sign language interpreter at Mandela service called out as fake on Twitter