An earthquake described by Mexico’s president as the country’s strongest in a century has struck off the southern coast, killing at least six people.
One person also died in neighbouring Guatemala, its president has said.
The quake, which Mexico’s leader Enrique Peña Nieto said measured 8.2, struck in the Pacific, about 87km (54 miles) south-west of Pijijiapan.
A tsunami warning was issued for Mexico, with three-metre-high waves possible, and other nearby countries.
The quake, which struck at 04:50 GMT, was felt in Mexico City, with buildings swaying and people running into the street. The tremors there, about 1,000km from the epicentre, were reported to have lasted up to a minute.
President Peña Nieto said some 50 million Mexicans would have felt the tremor and that the death toll might rise.
Four deaths were reported in Mexico’s Chiapas state, near the epicentre.
Two children were killed in Tabasco state, one a baby who died when power was cut to a respirator.
Severe damage was reported in southern Mexico and in western Guatemala.
Social media images showed collapsed buildings in the Mexican state of Oaxaca, including in the city of the same name and in Juchitan, where the municipal palace and a number of other structures were levelled.
Local reports speak of a hospital in Juchitan also collapsing and say there are a number of deaths in the city.
The Pacific Tsunami Warning Center said that tsunami waves “reaching more than three metres above the tide level are possible along the coasts of Mexico”. There is a coastal evacuation in Chiapas state.
It warned of tsunami threats for El Salvador, Guatemala, Honduras and Costa Rica, but at lower wave levels.
The quake struck at a depth of 70km, the USGS said.
At magnitude 8.2, the quake outstrips the deadly 1985 tremor that hit close to Mexico City and caused thousands of deaths.
The US Geological Survey measured Friday’s quake slightly lower, at 8.1
More than a dozen aftershocks ranging from 4.3 to 5.7 in magnitude have been recorded closer to the Mexican coast, off the town of Paredon.
Mr Peña Nieto warned there might be more.
He also said the Salina Cruz refinery on the southern coast had temporarily suspended operations.
Schools have been closed in 11 Mexican states.
Some electricity cuts have been reported in the capital and social media video showed lampposts and the famous Angel of Independence statue swaying violently, but there are no reports of major damage there.
Journalist Franc Contreras, who is in Mexico City, told the BBC: “You could hear loud cracks in the concrete. It sounded like a giant wooden branch being just broken open violently.
“People were streaming out of the hallways here. And everybody walking out single file into the streets, trying to avoid overhead high power lines.”
Guatemalan President Jimmy Morales appealed for calm on national television and in a Twitter post.
“We have reports of some damage and the death of one person, even though we still don’t have exact details,” Associated Press quoted Mr Morales as saying.
Cindy Lamothe, who is in the Guatemalan city of Antigua, told the BBC: “It was swaying so intensely it felt like we were in a boat and I heard neighbours screaming through the walls… it lasted almost three minutes.”
No tsunami warning has been issued for the US west coast.
Mexico is currently also being threatened on its eastern coast by Hurricane Katia.
The category one hurricane is about 300km south-east of Tampico and has sustained winds of 140km/h the National Hurricane Center says.