The most powerful earthquake to hit Mexico in a century has killed at least 15 people, toppled homes, sent people fleeing into the streets and triggered a tsunami alert, officials said.

The US Geological Survey reported the temblor’s magnitude as 8.1 and said it was centered off Chiapas state near the Guatemalan border.

But President Enrique Peña Nieto, quoting local calculations, said it was 8.2, making it the largest in Mexico in 100 years — even larger than the magnitude-8.1 quake in 1985, which killed thousands and devastated much of Mexico City.

“According to the latest evaluation, the earthquake had a magnitude of 8.2, the strongest in nearly a century. Unfortunately there are deaths reported, and I send my deepest condolences to the families,” Peña Nieto said.

Officials said at least five people were killed after the quake struck at 11:49 p.m. Thursday, but warned that the death toll could rise as authorities assess the damage during the day.

The government closed schools Friday in at least 11 states to check them for safety.

The US Geological Survey recorded at least 20 aftershocks of magnitude 4.0 or greater within about five hours after the main shake, and Peña Nieto warned that an aftershock as large as magnitude 7.2 could occur.

He said serious damage had been caused and that 1 million customers initially had been without power. Electricity was later restored to 800,000 of them.

The quake caused buildings to sway violently in Mexico City, more than 650 miles away. Residents fled buildings, many in their pajamas, and gathered in frightened groups in the street.

“The house moved like chewing gum and the light and internet went out momentarily,” said Rodrigo Soberanes, who lives near San Cristobal de las Casas in the southernmost state of Chiapas.

Chiapas Gov. Manuel Velasco said three people were killed in San Cristobal, including two women who died when a house and a wall collapsed.

Tabasco Gov. Arturo Núñez Jiménez said two children had died in his Gulf coast state. One of them was killed when a wall collapsed, and the other was a baby who died in a hospital that lost electricity, cutting off the infant’s ventilator.

In one neighborhood in Mexico City, 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,’” she told Reuters.

The Pacific Tsunami Warning Center said waves of 3.3 feet above the tide level were measured off Salina Cruz, Mexico. Smaller tsunami waves were observed on the coast or measured by ocean gauges in several other places.

The center’s forecast said Ecuador, El Salvador and Guatemala could see waves of a meter or less. No threat was posed to Hawaii and the western and South Pacific.

Meanwhile, Mexico braced for another emergency on the other side of the country as Hurricane Katia was expected to strike the Gulf coast in the state of Veracruz early Saturday as a Category 2 storm.

With Post wires