The quake was located in the Pacific Ocean, some 106 kilometres southwest of the city of Puerto Madero, in Mexico, the United States Geological Survey reported on its website.
It was recorded at 0646 GMT at a depth of just under 10 kilometres below the surface.
A smaller quake of 4.4 magnitude registered nearby just over an hour later. It was located 112 kilometres southwest of Puerto Madero, at a depth of just over 39 kilometres.