The quake was centred about 56 kilometres from Las Choapas, a city of about 70,000 people in the state of Veracruz, at a depth of 167 km.
A slight tremor from the quake was felt in Mexico City, about 400 km away.
There were no immediate reports of damage or injuries.