Thousands of people in the Indonesian province of Aceh took refuge for the night in mosques and temporary shelters after a strong earthquake Wednesday killed nearly 100 people and destroyed dozens of buildings.

Killer quakes occur regularly in the region, where many live with the terrifying memory of a giant earthquake that struck off Sumatra on Dec. 26, 2004. The 9.1-magnitude quake triggered a devastating tsunami that killed more than 100,000 Acehnese.

Maj. Gen. Tatang Sulaiman, chief of the army in Aceh, said at least 97 died in the 6.5-magnitude quake, which hit before dawn Wednesday, while four people had been pulled from the rubble alive. The Indonesian government declared a two-week emergency in Aceh.

The rescue effort involving thousands of search officials, villagers, soldiers and police is concentrated on Meureudu, a severely affected town in Pidie Jaya district near the epicenter.

The U.S. Geological Survey said the earthquake was centered about 12 miles southeast of Sigli, a town near the northern tip of Sumatra, at a depth of 11 miles. The agency had initially placed the epicenter undersea.

Aceh’s disaster mitigation agency said more than 600 people were injured. The national disaster agency said about 245 buildings were seriously damaged or destroyed in Pidie Jaya and neighboring Bireuen district, including 14 mosques. Roads also cracked, and power poles toppled over.

Indonesia, the world’s largest archipelago, is prone to earthquakes because of 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.

In the capital, Jakarta, President Joko Widodo said he had ordered all government agencies to take part in the rescue efforts for Aceh, a conservative Muslim province that has considerable autonomy from the central government under a peace deal with separatists.

Aiyub Abbas, the chief of Pidie Jaya district, said there was an urgent need for emergency supplies.

Zunaidi, a village chief in Pidie Jaya, said about 1,700 people from the village moved to a temporary shelter at an Islamic boarding school about six miles south of Meureudu.

He said most took shelter because they feared aftershocks could knock down their houses, which were partially damaged.

The general hospital in Pidie Jaya was overwhelmed with the injured, according to its director, Muhammad Reza Faisal.