Among the fatalities were two women and five men. Another 11 people were injured.
The quake hit at 10.29 am local time (1529 GMT), with the epicentre located 23 km south of La Crucecita, a seaside town along the southern state of Oaxaca’s Pacific Coast.
Oaxaca Governor Alejandro Murat said in a video message that 85 towns cross the state reported some degree of damage, but airports and hospitals attending to COVID-19 patients were operating as normal.
Three federal highways, six state highways and two bridges that were affected by the quake have now been opened to traffic.
Electricity was expected to be fully reestablished Wednesday, the governor said in the video posted on Twitter.
In a separate statement, Murat said soldiers and National Guard troops were deployed in the southern mountainous area of Ozolotepec, given the “significant damage” caused by landslides blocking roadways.
According to the national civil protection agency CNPC, the earthquake injured two people in capital Mexico City, and caused minor damage to 32 buildings there.
Some 46 million people in 12 southern and central states felt the earthquake, which has been followed by 1,738 aftershocks, the largest with a magnitude of 5.5, according to the National Seismological Service (SSN).
Oaxaca is one of Mexico’s most quake-prone states, with 25 per cent of all earthquakes in Mexico occurring there, according to a special report from the SSN.