Mosques, stores and houses collapsed in Pidie Jaya district, close to the epicentre. Tremors panicked residents of the province.
The death toll from a 6.4-magnitude earthquake in Indonesia's northern province of Aceh early on Wednesday is at least 97, a senior army officer said.
Major General Tatang Sulaiman said that four people were pulled from the rubble alive and he believes there may be another four or five still buried. He didn't say whether they were alive as rescue efforts continue.
Indonesia's National Disaster Mitigation Agency said at least 78 people suffered serious injuries.
The shallow quake hit 10 kilometres north of Reuleuet at 5:03 am local time (22:03 GMT Tuesday). At least five aftershocks followed the quake which struck at dawn, as some in the predominantly Muslim region prepared for morning prayers.
"Eighteen have died so far, based on data from the hospital. Some of the fatalities are children," said Saed Mulyadi, deputy district chief of the Pidie Jaya district, which is the focus of rescue efforts, and is 18 kilometres southwest of the epicentre.
Mulyadi said there were seven children among the victims and added that a local hospital was overwhelmed by the number of people arriving with injuries.
"The hospital here couldn't take the patients, so we sent some to a neighbouring district," he said.
Local resident Hasbi Jaya, 37, said his family was asleep when the powerful quake struck.
"We immediately ran outside the house but it crumbled. Everything from the roof to the floor collapsed, and was destroyed," he said.
The local disaster management agency said rescue efforts were underway to save those trapped beneath collapsed buildings.
"Some people are still trapped inside shophouses, and we are trying to evacuate them using heavy machines and by hand," local agency head Puteh Manaf said.
Seismologists said the earthquake was felt across much of Aceh province, but did not trigger a tsunami alert.
In the coastal town of Sigli, people panicked and fled their houses to seek shelter away from the sea.
"We are now evacuating to Tijue because we are afraid of a tsunami," said Nilawati, one of those heading several kilometres inland.
Seismic and volcanic activity are frequent in Indonesia, a country located on the Pacific "Ring of Fire," where tectonic plates collide.
Last June a 6.5-magnitude quake struck off the west of Sumatra damaging scores of buildings and injuring eight people.
Aceh was devastated by a quake-triggered tsunami that killed at least 170,000 people in Indonesia in 2004.