A major earthquake of magnitude 7.1 struck central Mexico on Tuesday, killing at least 119 people in several states and toppling buildings in the heavily populated capital where rescuers searched frantically for survivors under the rubble.

Thousands of people ran out into the streets in panic, and millions lost electricity when the quake struck around lunchtime.

Sirens blared as first responders rushed through the streets of Mexico City. President Enrique Pena Nieto said 27 buildings had collapsed or partially collapsed there.

“People are really scared right now," said dentist Claudia Meneses who was in her clinic in Mexico City's Lindavista neighbourhood when the earthquake struck in the afternoon. “We’re going to go to a building that fell to see if we can help.”

Earthquakes of magnitude 7 or above are regarded as major and are capable of causing widespread heavy damage.

Initial reports showed the worst-hit area was the state of Morelos, just south of Mexico City. At least 54 people died there, according to a state official. Authorities reported other deaths in Mexico City, and in neighbouring Puebla and the State of Mexico.

Power was cut to 3.8 million customers, the national electricity company CFE said.

It was the second powerful earthquake to hit Mexico this month. Another quake on Sept. 7 in southern Mexico killed at least 98 people.

U.S. President Donald Trump said on Twitter: "God bless the people of Mexico City. We are with you and will be there for you." The city, one of the world's most populous, and surrounding area are home to about 20 million people.

ILL-FATED DATE

The quake hit 32 years to the day since a devastating earthquake killed thousands in Mexico City in 1985. Many Mexicans had participated in earthquake drills around the nation on Tuesday as is customary every Sept. 19.

Dozens of police, rescue workers and neighbours dug through the wreckage of collapsed buildings in Mexico City.

At least one survivor was pulled from a collapsed building in the city's busy Condesa neighbourhood, and another person was rescued from a six-story apartment building nearby.

In Cuernavaca, a city in Morelos that is a popular destination for weekend visitors from Mexico City, there were reports on local radio of people trapped beneath collapsed buildings.

Mexican TV and social media showed cars crushed by debris.

"We got out really fast, leaving everything as it was and just left," said Rosaura Suarez, as she stood with a crowd on the street in Mexico City.

Mexican stocks and the peso currency dropped on news of the earthquake, and Mexico's stock exchange suspended trading.

The epicentre of Tuesday's quake was located in the central state of Puebla, the U.S. Geological Survey said.