An undersea earthquake off Indonesia's northern Aceh province has killed at least 97 people, local military officials say.
The 6.4 magnitude quake struck near the town of Sigli on Sumatra Island, where dozens of buildings have collapsed.
"So far, 97 people have been killed and the number keeps growing," Aceh military chief Tatang Sulaiman said in a live TV interview.
Hundreds of people have been injured.
Indonesia's meteorological agency said there was no risk of a tsunami.
National disaster management agency spokesman Sutopo Nugroho Nugroho said a state of emergency had been declared in Aceh.
He said more than 200 shops and homes had been destroyed, along with 14 mosques. A hospital and school were also badly damaged.
"We estimate the number of casualties will continue to rise as some of the residents are still likely [to be] under the rubble of the buildings. The search and rescue operation is still underway," he said.
Thousands of rescuers, including soldiers, had been deployed.
President Joko Widodo said he had instructed his chief of staff to visit the disaster area.
Major General Tatang Sulaiman said four people had been rescued alive from the rubble and he believed there might be four or five more still buried, though he did not say whether they were alive.
"Hopefully we would be able to finish the evacuation from the rubble before sunset," he said.
In 2004, Aceh was devastated by a tsunami caused by a massive undersea earthquake that killed 120,000 people in the province.
The US Geological Survey said the earthquake struck just offshore just past 5am local time (11am Wednesday NZT) at a depth of 17.2km.
Said Mulyadi, deputy district chief of Pidie Jaya, the region hit hardest by the quake, said he was worried the number of dead could rise.
Local authorities say heavy equipment is being used to search for survivors.
The quake also shook the nearby provincial capital of Banda Aceh and prompted many people to flee their homes and workplaces across the region.
Mr Nugroho confirmed Pidie Jaya, which has a population of about 140,000, bore the brunt of the damage.
"Many of the victims were killed or injured not because of the quake itself but because of collapsing buildings," he said.
Volunteer teams brought injured residents to local hospitals, filling most to capacity. Many of those treated in hospital corridors and hastily erected disaster tents had suffered broken bones and scratches, a witness told Reuters.
Images on television and social media showed victims being rushed to hospital, flattened buildings and fallen electricity poles, and people gathering outside at street corners.
Heavy equipment is being used to search for survivors, but Puteh Manaf, head of the local disaster management agency, said more people were needed to help because some staff were busy helping their own families.
An Indonesian Red Crescent volunteer described scenes of heavy damage and said many people had been injured.
"There isn't enough medical staff around," the Red Crescent's Muklis, who like many Indonesians uses one name, told TVOne.
The island of Sumatra has already been hit by several earthquakes this year.
Indonesia is prone to earthquakes because it lies on the notorious Ring of Fire - the line of frequent quakes and volcanic eruptions that circles virtually the entire Pacific Rim.
- BBC / Reuters