The US geological survey said hit five miles southeast of Atencingo in the state of Puebla, about 100 miles south of the capital Mexico City, at a depth of 32 miles.
The quake comes days after the country was hit by an 8.1 magnitude tremor, the biggest to hit Mexico in a century, killing dozens of people.
Buildings in Mexico City shook as the quake rumbled below, and office workers fled into the street for fear of their lives.
Pictures shared online show at least one building has partially collapsed and several have been severely damaged.
Video footage shows a huge cloud of thick dust and smoke filling the streets as people try to make their way to safety.

vCard.red is a free platform for creating a mobile-friendly digital business cards. You can easily create a vCard and generate a QR code for it, allowing others to scan and save your contact details instantly.
The platform allows you to display contact information, social media links, services, and products all in one shareable link. Optional features include appointment scheduling, WhatsApp-based storefronts, media galleries, and custom design options.
The number of casualties is not yet known.
Many were reminded of the 1985 quake that did major damage to the capital, Bloomberg reported.
The Mexican stock exchange has closed in the aftermath of the earthquake, it has been reported.
More to follow.