According to the Mexican National Seismological Service (MNSS), the 5.0 earthquake was registered at a depth of 13 kilometres (8 miles), 28 kilometres southwest of San Marcos, at 11:20 p.m. local time (16:00 GMT).
No casualties or damages have been reported following the quake and a tsunami alert has not been issued.
In August and May, 5.8 and 5.6 magnitude earthquakes struck off Mexico's Pacific coast, although there were no reports of casualties or damages caused by the tremors.
The Mexican Pacific coast is located in the so-called Ring of Fire, a seismically active zone that is often hit by powerful earthquakes.