The U.S. Geological Survey said the quake had a magnitude of 6.1 and was centered on the Pacific coast, near the resort of Acapulco.
Buildings swayed in the capital and some people fled into the streets.
Mexico City is vulnerable even to distant earthquakes because much of it sits atop the muddy sediments of drained lake beds that quiver as quake waves hit.
The magnitude-8.1 quake in 1985 that killed at least 6,000 people and destroyed many buildings in Mexico City was centered 250 miles (400 kilometers) away on the Pacific Coast.
Take ABC13 with you!
Download our free apps for iPhone, iPad, and Android devices