Updated at 11am

A strong undersea earthquake rocked Indonesia's Aceh province early on Wednesday, killing nearly 100 people and sparking a frantic rescue effort in the rubble of dozens of collapsed and damaged buildings.

Major General Tatang Sulaiman, chief of the army in Aceh province, said at least 97 people had died while four others were pulled from the rubble alive. Another four or five were still believed to be buried, but it was not known if they were dead or alive.

"Hopefully we would be able to finish the evacuation from the rubble before sunset," said Maj Gen Sulaiman.

The rescue effort involving thousands of villagers, soldiers and police was concentrated on Meureudu, a severely affected town in Pidie Jaya district.

Excavators were trying to remove debris from shop houses and other buildings where people were believed to have been buried. TV footage showed rescuers in orange uniforms shining torches into the interiors of broken buildings as they searched for signs of life.

The National Disaster Mitigation Agency said 273 people were injured, about a quarter of them seriously. Some 245 buildings were seriously damaged or destroyed, mostly in Pidie Jaya, including 14 mosques and the remainder largely dwellings and shop houses. Roads also cracked and power poles toppled over.

Aiyub Abbas, the chief of Pidie Jaya district, which is 11 miles (18km) south-west of the epicentre, said there was urgent need for excavation equipment to move heavy debris and emergency supplies. Footage showed rescue personnel taking bodies in black bags away from the rubble.

The US Geological Survey said the shallow 6.5 magnitude earthquake which struck at 5.03am local time (2203 GMT Tuesday) was centred about 12 miles (19km) south-east of Sigli, a town on the northern tip of Aceh, at a depth of 11 miles (18km). It did not generate a tsunami.

For Acehnese, the quake was a terrifying reminder of their region's vulnerability to natural disasters. More than 100,000 died in Aceh after the earthquake on December 26 2004 triggered a devastating tsunami.

"It was very bad, the tremors felt even stronger than 2004 earthquake," said Musman Aziz, a Meureudu resident. "I was so scared the tsunami was coming."

In the capital, Jakarta, President Joko "Jokowi" Widodo said he has ordered all government agencies to take part in the rescue efforts. The Red Cross Indonesia has deployed emergency response teams and advertised bank accounts for donations. The International Organisation for Migration said it had sent an assessment team to Aceh.

Seaside resident Fitri Abidin in Pidie Jaya said she fled with her husband and wailing children to a nearby hill after the quake jolted the family awake early in the morning. They stayed there for several hours until authorities reassured them there was no tsunami risk.

"It terrified me. I was having difficulty breathing or walking," said Ms Abidin.

She said her husband grabbed hold of her and carried her out of the house.

The family's home did not collapse but some neighbours' properties did and Ms Abidin is afraid three friends were buried in building collapses.

In Pidie Jaya's neighbouring district of Bireuen, a teacher at an Islamic building school died after being hit by falling debris, said health worker Achmad Taufiq.

Residents of the nearby town of Lhokseumawe ran out of their houses in panic during the quake and many people fled to higher ground.

The world's largest archipelago, Indonesia is prone to earthquakes due to its location on the Pacific "Ring of Fire", an arc of volcanoes and fault lines in the Pacific Basin.

The 2004 quake and tsunami killed a total of 230,000 people in a dozen countries, most of them in Aceh.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.