The strong temblor caused tall buildings to sway more than 200 miles away in Mexico City. People evacuated some buildings in the capital, but there were no immediate reports of damage or injuries.
Authorities in Michoacan state, where the tremor was centered, also had no immediate reports of damage.
The U.S. Geological Survey said the quake was centered 238 miles west-southwest of Mexico City. A quake of that magnitude is considered a major earthquake, but this one hit about 41 miles below the surface and a tremor's power to cause damage is often dissipated when it is so deep.
The Associated Press contributed to this report.