A powerful 7.4 magnitude earthquake struck southern Mexico on Tuesday leaving five people dead but an initial tsunami warning was later reversed.

The epicenter was near Crucecita, in the southeastern state of Oaxaca, with shock waves felt as far away as Mexico City, some 700 kilometers (430 miles) distant, where it sent frightened residents rushing into the streets.

All the deaths occurred in Oaxaca. A woman died near Crucecita, and four other people died in towns located within 150 kilometers of the epicenter, officials said.

People gather outside a hospital in Mexico
People gather outside a hospital in Mexico City, on June 23, 2020, after a powerful quake rocked the south of the county. Photo: AFP / RODRIGO ARANGUA

The US Geological Survey reported that the quake struck with a magnitude of 7.4, at a depth of 23 kilometers. After initially publishing a reading of 7.1, the Mexican Seismological Service revised its figure to 7.5.

"It's confirmed it was a 7.5 magnitude. Fortunately there's no damage, in any case we're going to continue to call for caution as there may be aftershocks and we must all take care without worrying," said President Andres Manuel Lopez Obrador in a video published on social media.

"Strategic installations didn't suffer any damage, that is to say, ports, airports, refineries, hydroelectric plants, everything is in a good condition," said Lopez Obrador after speaking to David Leon, the national coordinator of Mexico's Civil Protection force.

Tsunami alert in Mexico after earthquake
Workers remove rubble and place security tape alerting of a damaged building after a quake in Oaxaca, Mexico. Photo: AFP / PATRICIA CASTELLANOS

Mexican Oil said its refinery in Salina Cruz, Oaxaca had been shut down as a precaution after a fire broke out "that was immediately stifled."

A worker at the refinery was killed after falling off a high structure. Other refineries in the state are operating as normal.

The quake also caused slight damage to four hospitals and a clinic, as well as to churches, markets and other buildings, authorities said.

Tsunami alert in Mexico after earthquake
A motorcyclist rides past a damaged building after a quake in Oaxaca, Mexico. Photo: AFP / PATRICIA CASTELLANOS

Six hours after the quake, 447 aftershocks had been recorded across the region, the strongest at 4.6 magnitude.

"We had to leave because there is a risk that the market will collapse. We are hardly selling anything because of the pandemic and now if the market is closed we will have a worse time," said Juana Martinez, 60, a flower-seller in Oaxaca city.

The US Pacific Tsunami warning center initially said hazardous waves as high as three meters could strike anywhere within 1,000 kilometers of the quake's epicenter, affecting the Pacific coast of Mexico and Central and South America.

However, a few hours later it said the threat had "largely passed."

Tsunami alert in Mexico after earthquake
People remain outside buildings in Mexico City during the quake. Photo: AFP / CLAUDIO CRUZ

Mexico City mayor Claudia Sheinbaum also activated response protocols, adding that two people had been injured. Apart from some building facades falling, she said there had been "no major incidents" reported.

The earthquake was felt in several parts of the capital of 8.8 million people which in 2017 was hit by a 7.1 magnitude quake that left 360 people dead throughout the country.

That same year, 96 people died after an 8.1 magnitude quake struck the south of the country, with Oaxaca the worst affected state.

The quake has hit at a time when Mexico is already reeling from the coronavirus pandemic.

It has suffered more than 22,500 COVID-19 deaths -- the second most in Latin America -- and 185,000 cases.

Medical staff were evacuated from some hospitals in the capital alongside patients, although those suffering from the coronavirus remained isolated inside the buildings, alongside their carers.

"All those that are in an area with COVID patients remain inside, only those of us who weren't there at the time" have come out, said Jaime Gomez, a nurse at a hospital caring for coronavirus patients.

Many of the people that fled into the streets of the capital were wearing face masks.

"With all the virus problems and now the tremors, and I've just lost one child and the other is ill, so imagine (how I'm feeling)," a tearful Maria Teresa Duran, 80, told AFP.

The quake took many people by surprise in the capital, including some working from home due to virus lockdown measures.

"We were working in our pyjamas, finishing off breakfast and then we had to get out like this," said 29-year-old Sonia Flores Cano.

Copyright AFP. All rights reserved.