A tsunami warning has been issued for Mexico, Guatemala, El Salvador, Costa Rica, Nicaragua, Panama and Honduras.
The quake was felt in Mexico City, with people running into the street.
The tremors there were reported to have lasted up to a minute.
Two deaths were reported in Mexico's Chiapas state, closer to the epicentre, and two more in Tabasco state.
Guatemala's president also reported at least one death in his country.
Damage was reported to buildings in southern Mexico and in Guatemala.