Pemex, the state-run oil company, said the quake caused a fire at its refinery in the Pacific coast city of Salina Cruz, relatively near the epicenter. It said one worker was injured and the flames were quickly extinguished.
A powerful earthquake centered near the southern Mexico resort of Huatulco has killed at least five people.
The magnitude 7.4 quake on Tuesday swayed buildings in Mexico City and sent thousands fleeing into the streets.
Mexico President Andres Manuel Lopez Obrador said one person was killed and another injured in a building collapse in Huatulco, Oaxaca.
Otherwise he said reports were of minor damage from the quake, including broken windows and collapsed walls.
Oaxaca Governor Alejandro Murat said a second person was killed in an apparent house collapse in the tiny mountain village of San Juan Ozolotepec, and said a third died in circumstances he did not explain.
Federal civil defence authorities reported two more deaths: a worker at the state-run oil company, Pemex, fell to his death from a refinery structure, and a man died in the Oaxaca village of San Agustin Amatengo when a wall fell on him.
Pemex also said the quake caused a fire at its refinery in the Pacific coast city of Salina Cruz, relatively near the epicentre.
It said one worker was injured and the flames were quickly extinguished. Churches, bridges and highways also suffered damage during the quake.
Lopez Obrador said there had been more than 140 aftershocks, most of them small.
Seismic alarms sounded midmorning with enough warning for residents to exit buildings. Power was knocked out to some areas.
Helicopters flew over downtown Mexico City and police patrols sounded their sirens.
Many not wearing mask despite pandemic
Groups of people still milled around in close proximity on streets and sidewalks in some neighborhoods of the capital about an hour after the quake.
Many were not wearing masks despite past appeals from municipal officials for them to do so as a way to curb the spread of the new coronavirus.
Inside a Mexico City military barracks converted to Covid-19 hospital, medical staff suited in protective equipment tried to calm anxious patients. Unable to evacuate isolation areas, patients huddled under a large beam in the women's ward while a nurse tried to calm one having a panic attack.
Teresa Juarez could only wish for it to pass quickly from her hospital bed where she lay connected to oxygen. Diabetic and with high blood pressure, Juarez said she thought about her five children. “It's horrible, you're here and you don't know what to do,” she said.
The US Geologic Survey said the quake hit at 10:29 am local time along Mexico's southern Pacific coast at a depth of 26 kilometres (16 miles). The epicentre was 7 miles (12 km) south-southwest of Santa Maria Zapotitlan in Oaxaca state
It was felt in Guatemala and throughout south and central Mexico.
In Huatulco, a laid-back beach destination known for surfing and small protected coves, the earthquake knocked goods off shelves and some rubble from buildings.
Mari Gonzalez of the Princess Mayev hotel in Huatulco said staff and guests were able to evacuate the building before the quake, but that 45 minutes after the initial quake they were still outside as strong aftershocks continued.
“It was strong, very strong,” she said.
Gonzalez said there was some visible broken glass and mirrors, but no major damage. The staff was waiting for the aftershocks to dissipate before fully evaluating the property.
Local news media reported damage to some buildings in the state capital, Oaxaca city. State officials said they were looking for damage.
The USGS estimated that some 2 million people felt strong or moderate shaking and another 49 million felt weak or light shaking.
Around 10,000 killed in 35 years
The earthquake hit a quake-prone region where four underground tectonic plates come together. In the past 35 years, there have been at least seven magnitude 7 or greater earthquakes, killing around 10,000 people — most of them in a 1985 8.0 quake.
“This has the potential to be a deadly earthquake and cause significant damage,” US Geological Survey seismologist Paul Earle said. “This area is capable of and has had larger earthquakes in the past.”
“There will be aftershocks,” Earle said. “It is not unexpected to see a magnitude 6 at this point and a number of smaller ones.”
This quake happened when the Cocos plate, which is to the southwest of the area, slipped under the North American plate, Earle said.
“You’ve got all sorts of plates and they’re moving quickly,” Earle said. “The important thing is how fast the plates are moving relative to each other.”
The US National Oceanic and Atmospheric Administration forecast a tsunami threat with waves three to 10 feet above tide levels along parts of the coasts of Mexico. Smaller waves were expected through Central America, Peru and Ecuador.