At least three people were killed in the earthquake, one a man crushed when a roof collapsed.
There were no reports of widespread damage.
The U.S. Geological Service said the quake occurred 40.3 miles deep and about 103 miles south-southwest of Mexico City.
Mexico City's mayor, Marcelo Ebrard, said via Twitter that no major damage had been reported although there were some power failures in parts of the city.
High-rises swayed in the center of Mexico City and shoppers were temporarily herded out of some shopping centers.
The USGS initially estimated the quake at magnitude 6.8, but downgraded it to 6.7 and then 6.5.