The U.S. Geological Survey said the quake at about 9:30 a.m. (10:30 a.m. EDT; 1430 GMT) was centered on a long-dormant fault line northwest of the Pacific resort of Acapulco, where many Mexicans are vacationing for the Easter holiday.
It was felt across at least a half-dozen states and Mexico's capital, where it collapsed several walls and left larges cracks in some facades. Debris covered sidewalks around the city.
Around the region, there were reports of isolated and minor damage, such as fallen fences, trees and broken windows. Chilpancingo, capital of the southern state of Guerrero, where the quake was centered, reported a power outage, but service was restored after 15 minutes.
In Acapulco, 59-year-old Enedina Ramirez Perez was having breakfast, enjoying the holiday with about 20 family members, when her hotel started to shake.
"People were turning over chairs in their desperation to get out, grabbing children, trampling people," the Mexico City woman said. "The hotel security was excellent and started calming people down. They got everyone to leave quietly."
The quake struck 170 miles (273 kilometers) southwest of Mexico City, where people fled high-rises and took to the streets, many in still in their bathrobes and pajamas on their day off.
"I started to hear the walls creak and I said, 'Let's go,'" said Rodolfo Duarte, 32, who fled his third-floor apartment.
Mexico City Mayor Miguel Angel Mancera said there were small power outages from fallen transformers but officials were working to restore the service.
The USGS initially calculated the quake's magnitude at 7.5, but later downgraded it to 7.2. It said the quake was centered 22 miles (36 kilometers) northwest of the town of Tecpan de Galeana, and was 15 miles (24 kilometers) deep.
Friday's quake occurred along a section of the Pacific Coast known as the Guerrero Seismic Gap, a 125-mile (200-kilometer) section where tectonic plates meet and have been locked, meaning huge amounts of energy are being stored up with potentially devastating effects, said USGS seismologist Gavin Hayes.
The last large quake that occurred along the section was a magnitude-7.6 temblor in 1911, Hayes said.
He said scientists will be watching the area more intensely because moderate quakes such as Friday's can destabilize the surrounding sections of seismic plate and increase the chance of a more powerful temblor.
The USGS says the Guerrero Gap has the potential to produce a quake as strong as magnitude 8.4, potentially much more powerful than the magnitude-8.1 quake that killed 9,500 people and devastated large sections of Mexico City in 1985. The 1985 quake was centered 250 miles (400 kilometers) from the capital on the Pacific Coast.
Mexico City itself 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.
Miriam Matz, 45, gathered her suitcases and her teenage daughter to temporarily move out the apartment in the Morelos housing towers in downtown Mexico City where she has lived for five years, after brickwork and concrete slabs fell off the side of the 15-story tower, and long snaking cracks appeared on some walls during Friday's earthquake.
The sidewalk in front of the building was littered with bits of brick, glass and smashed concrete, and the area was roped off with yellow police tape.
Authorities have not forced residents to evacuate, but Matz said she would leave for safety's sake.
"We are going to spend a night or two at my sister's house, in case there are any aftershocks," she said.
Associated Press writers Mark Stevenson, Michael Weissenstein and E. Eduardo Castillo contributed to this report from Mexico City.