The U.S. Geological Survey says the quake's epicentre was located about 10 km off Mexico's Pacific Coast near the town of Pinotepa Nacional in southern Oaxaca State at 5.10 a.m. local time. A magnitude-5.3 aftershock followed about three hours later.
Mexico City Mayor Marcelo Ebrard said via Twitter that everything was operating normally in the metropolis of more than 21 million people.
Mexico has been hit by several quakes in the last three weeks, rattling the nerves of weary residents.
Three tectonic plates come together off Mexico's Pacific coast, and the country is hit with hundreds of small-magnitude earthquakes each year.