People rushed into the streets of Mexico City as buildings swayed for over a minute, beginning at 6:47 p.m. local time.
Mexico’s Interior Department said the shaking was felt in parts of nine states, but that there were no reports of significant damage.
The three victims were in the state of Guerrero, where one died when a roof collapsed and another was killed when rocks fell onto his vehicle.
Thousands of tourists in Acapulco fled their hotel rooms and local businesses as buildings there shuttered.
There were reports of scattered power failures for an hour or so after the quake struck.
The same region of Mexico suffered a devastating temblor in 1985, when as many as 10,000 people were killed around Mexico City.
The capital experiences greater shaking from seismic events because it sits on the soil of a former lake bed that has dried out since colonial times.