MEXICO CITY -- A powerful earthquake shook south and central Mexico on Friday, causing residents to flee buildings in the country's capital. Crowds of people gathered on central Reforma Avenue in Mexico City as the ground shook.

The U.S. Geological Survey put the quake's preliminary magnitude at 7.2 and said its epicenter was 33 miles, 53 kilometers, northeast of Pinotepa in Oaxaca state. It had a depth of 15 miles, or 24 kilometers. The epicenter is a rural area of western Oaxaca state near the Pacific coast and the border with Guerrero state.

Videos posted to social media showed light fixtures violently swinging inside office buildings. Others showed street and traffic lights swaying from side-to-side.

Get Breaking News Delivered to Your Inbox

The Oaxaca state civil protection agency said via Twitter that it was monitoring the coastline.

In September, a magnitude 7.1 earthquake struck central Mexico, leaving 228 people dead in the capital and 369 across the region.

This is a developing story and will be updated.