The powerful 8.2-magnitude quake struck off Mexico's far southern Pacific coast just before midnight Thursday, about 100 kilometers from the town of Tonala.
The earthquake triggered a 1-meter-high tsunami, according to the Pacific Tsunami Warning Center, but there were no reports of tsunami damage.
The quake was felt as far away as Mexico City and Guatemala City. Residents of the Mexican capital fled into the streets, many in their pajamas, for fear buildings would collapse.
Mexican President Enrique Pena Nieto has said the earthquake was bigger than a 1985 earthquake in the country that killed thousands. In a televised address Friday evening, he declared three days of national mourning and promised that the government will help rebuild.
'The power of this earthquake was devastating,' Pena Nieto said, but added that Mexico's response 'will be greater.'