"Fortunately there's no damage, in any case we're going to continue to call for caution as there may be aftershocks and we must all take care without worrying", said President Andres Manuel Lopez Obrador in a video published on social media.
Oaxaca governor Alejandro Ismael Murat Hinojosa issued a statement indicating there 'are no damages.
A powerful natural disaster centered near the Mexican resort town of Huatulco has killed at least two people, officials said Tuesday.
Thousands of people reportedly fled their houses into the streets after city alarms alerted residents minutes before the tremors hit.
The 7.4 magnitude quake hit at 10:29 a.m., about 40 miles from the beach resort of Huatulco in Oaxaca state, a region that is still recovering from a deadly 2017 temblor.
The dead included a worker from state oil company Pemex, who fell from a height.
Miguel Candelaria, 30, was working at his computer in his family home in the Oaxaca town of Juchitan when the ground began to tremble.
A man removes rubble from a building damaged by an earthquake in Oaxaca Mexico
Because oceanic crust is relatively dense, when the Pacific Ocean floor encounters the lighter continental crust of the Mexican landmass, the ocean floor is subducted beneath the North American plate creating the deep Middle American trench along Mexico's southern coast.
Quakes of magnitudes over 7 are major earthquakes capable of widespread, heavy damage.
Helicopters flew over downtown Mexico City and police patrols sounded their sirens after the quake struck.
Mexico's civil protection agency said the death toll from the quake was four.
Power was cut in some areas around Mexico, but there were no reports of injures, Fox News reported. It was very shallow, only 26 km (16 miles) below the earth's surface, which would have amplified the shaking.
Near to the epicentre, Magdalena Castellanos Fermin was in the village of Santiago Astata when the "really intense" quake struck, sending large rocks tumbling down the hillside and alarming residents, she told Reuters by telephone. Otherwise he said reports were of minor damage such as broken windows and collapsed walls.
Situated at the intersection of three tectonic plates, Mexico is one of the world's most earthquake-prone countries.