The agency says the quake was centered in the Pacific Ocean about 35 miles (57 kilometers) southwest of Mapastepec in the state of Chiapas, near the border with Guatemala.
It hit just before 1 p.m. local time (18:47 GMT) Saturday. It had a depth of 41 miles (66 kilometers.)
There are no initial reports of damage.