Both Mexico's National Seismological Service and the US Geological Survey put the magnitude of the quake at 7.2.
It triggered Mexico City's alarm system and caused buildings to sway in the capital. It was also felt in the states of Oaxaca, Guerrero, Puebla and Michoacan.
Panicked residents flooded into the streets, fearing a repeat of the two quakes last September, which caused buildings to collapse and killed a total of 465 people.
"We're stressed out, we have flashbacks. So we run out into the street. It's all we can do."
On the north side of the city, Julia Hernandez said she felt like she was "in a boat" as the ground swayed beneath her feet.
"Is it ever going to stop?" she said.
Standing in the middle of the street, her eyes glued to her fifth-floor apartment, Graciela Escalante, 72, could hardly speak.
"It was terribly strong. We barely managed to get down the stairs. It was the longest staircase in the world," she told AFP.
"We thought everything was going to collapse again."
"Obviously people are afraid," said the emergency response chief for the city of Puebla, Gustavo Ariza.
President Enrique Pena Nieto tweeted that the National Emergency Committee had been activated because of the magnitude of the quake.
Emergency management authorities said there were no significant reports of damage so far.
Mexico City Mayor Miguel Angel Mancera reported "very minor" damage in the capital.
That included reports of a wall that collapsed in the upscale Condesa neighborhood, which was hit hard by last year's quakes.
A nearby hospital evacuated patients into the street, some in wheelchairs or carting their IV lines. Similar scenes were seen in Veracruz.
The quake struck at a relatively deep 24.7 kilometers, said the US Geological Survey, which put the epicenter 37 kilometers (22 miles) northeast of Pinotepa de Don Luis, in the southwestern state of Oaxaca.
A 5.9-magnitude aftershock hit nearly an hour later.
The latest tremor comes less than six months after last year's devastating earthquakes in central and southern Mexico.
On September 7 last year, an 8.2-magnitude earthquake shook the nation and killed 96 people, mostly in the states of Oaxaca and Chiapas.
Then on September 19 -- the 32nd anniversary of a huge 1985 quake that killed 10,000 people -- a 7.1-magnitude quake rocked the country, leaving 369 people dead.
Mexico sits at a spot where five tectonic plates come together, making it particularly vulnerable to earthquakes. (AFP)