A strong undersea earthquake has rocked Indonesia's Aceh province, 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 died while four people were pulled from the rubble alive.
Another four or five are still believed to be buried, but he didn't say if they are dead or alive.
"Hopefully we would be able to finish the evacuation from the rubble before sunset," said Mr Sulaiman.
The rescue effort involving thousands of villagers, soldiers and police is 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 buried.
TV footage showed rescuers in orange uniforms shining flashlight 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 located 18 kilometres southwest 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 that struck at 5:03 am on Wednesday was centred about 19 kilometres southeast of Sigli, a town on the northern tip of Aceh, at a depth of 17 kilometres. 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 December 26, 2004, earthquake 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 Organization for Migration said it had sent an assessment team to Aceh.
In Pidie Jaya's neighbouring district of Bireuen, a teacher at an Islamic school building 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.