Two people are dead and a million homes and businesses are without power after a prolonged earthquake struck Mexico on Friday, just months after a pair of deadly quakes pummelled parts of the country last year.

The 7.2-magnitude quake struck at 5:39pm local time, making buildings sway and sending people running into the street. The epicentre was a southern, surfer town on the Pacific Coast, according to the US Geological Survey. but tremors were felt as far away as Guatemala.

At least two people died when a helicopter carrying Mexico's interior minister and the governor of Oaxaca crashed while trying to land after a tour of damage from the earthquake, officials said. The senior officials survived.

Authorities said no deaths directly linked to the quake had been reported nationally.

Emergency warning systems were activated in Mexico City, some 348 kilometers (216 miles) from the centre of the quake. The seismic alarm sounded 72 seconds before tremors were felt, Mayor Miguel Angel Mancera said, giving residents time to flee to the streets.

Footage posted on social media showed lights swinging from ceilings in a shaking building in the city, while other videos showed people fleeing outside from their trembling offices. Buildings were seen swaying for more than a minute after the alarms sounded.

Video posted by a Washington Post reporter showed crowds of people standing calmly in a central Mexico City square, waiting for the rumblings to pass. Crowds of people also gathered on the streets in Oaxaca state's capital, closer to the epicentre of the quake, which hit 37 kilometres north-east of the coastal town of Pinotepa de Don Luis.

Patricia Gutierrez, a 66-year-old English teacher, told Reuters she was taking a nap with her 11-month-old granddaughter, when she heard the alarm.

"She recognised the sound. When I opened my eyes, I saw her eyes in terror," Ms Gutierrez said of her granddaughter. "Her eyes were wide, like plates. She didn't say anything."

Secretary of the Interior Alfonso Navarrete tweeted that Oaxaca, Chiapas, Michoacán, Puebla and Mexico City had not reported any major damages thus far. Mexican Civil Protection chief Luis Felipe Fuente also said that there were no immediate reports of major damages from Friday's quake.

Mexico City: How it's rebuilding after the September earthquake Show all 8 1 /8 Mexico City: How it's rebuilding after the September earthquake Mexico City: How it's rebuilding after the September earthquake Mexico City rebuilding after September earthquake A woman and two girls pass by a house which collapsed during the quake AFP/Getty Images Mexico City: How it's rebuilding after the September earthquake Mexico City rebuilding after September earthquake Technicians watch as a building seriously damaged by the September 19 earthquake is demolished AFP/Getty Images Mexico City: How it's rebuilding after the September earthquake Mexico City rebuilding after September earthquake A concert was held in aid of the victims of the September 19 earthquake, at the Zocalo Square in Mexico City on October 8 AFP/Getty Images Mexico City: How it's rebuilding after the September earthquake Mexico City rebuilding after September earthquake Rodrigo Diaz Mejia climbs over a crushed car into what was a second-story apartment AP Mexico City: How it's rebuilding after the September earthquake Mexico City rebuilding after September earthquake Presentation of the cultural program of Days of the Dead in Mexico City EPA Mexico City: How it's rebuilding after the September earthquake Mexico City rebuilding after September earthquake Workers tear down an earthquake-damaged building AP Mexico City: How it's rebuilding after the September earthquake Mexico City rebuilding after September earthquake Clowns take part in the 22nd Latin American clown convention at Revolucion monument in Mexico City REUTERS Mexico City: How it's rebuilding after the September earthquake Mexico City rebuilding after September earthquake A worker fills a water tank in the neighbourhood affected by the earthquake REUTERS

Mexican President Enrique Peña Nieto said the National Civil Protection system protocols had been activated, and the Oaxaca state civil protection agency tweeted that it was monitoring the coastline. No tsunami threat was detected, according to the US National Weather Service, but the Popocatepetl volcano south of the capital sent a kilometre-high column of ash into the sky, said Mexico's disaster prevention agency.

The Mexico City Government reminded residents via Twitter to check for damage, close gas valves, and disconnect energy sources when returning home. National oil firm Pemex said its installations were in order, including its biggest refinery 240 miles (386 km) from the epicentre.

The Oaxacan town of Jamiltepec appeared to sustain the heaviest impact in the southern region, with 50 homes damaged along with a church and government building, the state's civil protection agency said.

Patients were evacuated from a hospital there and from another in the nearby town of Putla Villa de Guerrero. On a local highway, a fire ignited when two high-tension electric cables struck each other.

About 100,000 people in Oaxaca had lost power, the state's governor said.

Guadalupe Martinez, a 64-year-old retiree, said she was still shaking from shock. But the quake was a far cry from the tremors that struck Mexico in September, Martinez said: "This time it was strong, but it did not jump up and down".

A pair of powerful earthquakes struck the country in September, killing more than 300 people. The second earthquake knocked out power to some 5m people, and temporarily shut down schools and public transportation.