MEXICO CITY - A powerful earthquake struck off the coast of Mexico early Friday and was felt as far away as Mexico City, reports said.

The quake had a preliminary magnitude of 8 and struck about 60 miles, or 96 kilometers, southwest of Pijijiapan, off the coast of Chiapas State, near the border with Guatemala.

The United States Geological Survey issued a tsunami warning right after the quake hit. The Associated Press reported that the quake was felt in the capital, Mexico City.

“I felt the earthquake in our neighborhood near downtown,” said Joel Petterson, a New York Times employee on vacation in Mexico City. “Our building started swaying about 20 minutes ago, and many people went out into the street.”

At least six people are dead and a tsunami measuring 0.7m has been confirmed in Mexico after a massive 8.2-magnitude earthquake hit off the coast of Southern Mexico on Thursday.

Mexico’s president says that the magnitude of the earthquake that hit the country is the biggest the country has seen in a century. A 1985 tremor flattened swathes of Mexico City and killed thousands.

Enrique Pena Nieto also said that major damage has been caused and that one million initially had been without power following the quake, but that electricity had been restored to 800,000 of them.

The US Geological Survey said the quake had a magnitude of 8.1 and its epicenter was 165 kilometers (102 miles) west of Tapachula in southern Chiapas state not far from Guatemala. It had a depth of 35 kilometers (22 miles).

The quake triggered waves as high as 2.3 ft (0.7 m) in Mexico, the Pacific Tsunami Warning Centre said. It said widespread, hazardous tsunami waves were possible within three hours. However, there was no tsunami threat for American Samoa and Hawaii, according to the US Tsunami Warning System.

As far as 14,000 km (8700 miles) away in the Philippines, the national disaster agency put the country’s entire eastern seaboard on alert. No forced evacuation was ordered, but residents were told to monitor emergency radio broadcasts.

In Mexico, some buildings were severely damaged in the south of the country, including a hotel where rescuers were searching to make sure nobody was trapped.

Windows were broken at Mexico City airport and power went out in several neighborhoods of the capital. The cornice of a hotel collapsed in the southern tourist city of Oaxaca, a witness said.

Houses were also toppled in Chiapas state, causing buildings to sway violently.

Chiapas Governor Manuel Velasco said two women died on San Cristobal when a house and a wall collapsed. He called on people living near the coast to leave their houses as a protective measure.

“There are damages in hospitals that have lost energy,” he said. “Homes, schools and hospitals have been damaged.”

The US Tsunami Warning System earlier suggested hazardous tsunami waves were possible on the Pacific coasts of several Central American countries. Waves were possible within the next three hours for Mexico, Guatemala, El Salvador, Costa Rica, Nicaragua, Panama, Honduras and Ecuador, it said. There was no tsunami threat for the US West Coast.

USGS reported several aftershocks, all greater than 5 magnitudes.

Civil protection officials were checking for damage in Chiapas, but the quake was so powerful that frightened residents in Mexico City more than 1,000 kilometers (650 miles) away fled apartment buildings, often in their pajamas, and gathered in groups in the street.

Around midnight buildings swayed strongly for more than minute, loosening light fixtures from ceilings.

Helicopters crisscrossed the sky above Mexico Dity with spotlights. Some neighborhoods kept electricity while others remained in darkness.

In one central neighborhood in central Mexico, dozens of people stood outside after the quake, some wrapped in blankets against the cool night air. Children were crying.

Liliana Villa, 35, was in her apartment when the earthquake struck and she fled to the street in her pajamas.

“It felt horrible, and I thought, ‘this is going to fall.’”

Reports on social media suggested that green lightning was seen before the earthquake. Many reports were also quick to link the unfolding natural disaster to hurricane Harvey and Irma.

The quake struck not far from Guatemala.

One of the most powerful Atlantic hurricanes ever recorded crescendoed over the Caribbean on Thursday, crumpling islands better known as beach paradises into half-habitable emergency zones and sideswiping Puerto Rico before churning north. It is expected to hit the Florida Keys and South Florida by Saturday night.

More than 70 percent of households in Puerto Rico were without power. On St. Martin, an official said 95 percent of the island was destroyed. The Haitian government called for all agencies, stores and banks to shut down as the storm hit. Prime Minister Gaston Browne of Antigua and Barbuda said that half of Barbuda had been left homeless.