The epicentre of the quake was near Atencingo in Puebla state, about 120km (75 miles) from Mexico City, with a depth of 51km (31.5 miles), according to the US Geological Survey.
Dozens of Mexico City residents quickly formed a human chain in a bid to clear the rubble of collapsed buildings and rescue trapped people underneath. President Enrique Pena Nieto said many people will need help, but the initial focus has to be on finding people trapped in wrecked buildings.
President Enrique Peña Nieto said late Tuesday that 22 bodies, two of them those of adults, were recovered from the scene of a school that collapsed in the capital.
Devastating images have emerged of the aftermath following the deadly magnitude 7.1 natural disaster that has killed 226 people, more than half of those in Mexico City.
This is a breaking news story.
Trump Considering Fourth of July Military Parade
The US does not have a history of major military parades marching through its cities, except to celebrate wartime victories. Trump was the VIP guest on the French president's viewing stand for a parade of French military troops and equipment.
Almost half of those killed are reported in the Mexico City, according to the Mexico's civil protection agency chief, Luis Felipe Puente. Mexico's education secretary, Aurelio Nuno, said 25 people were killed at the school, while 11 others were rescued and 30 were missing.
"Canada sends its condolences to families and friends in mourning, and hopes for a speedy recovery for the injured", she said, adding Canada is ready to assist Mexico as needed and appropriate.
Mexico City Mayor Miguel Angel Mancera told TV network Televisa that rescue services were dealing with collapsed or badly damaged buildings at 44 locations.
Hundreds of emergency workers spent the night pulling rubble from the ruins of the grade school with their bare hands under the glare of floodlights.