An Indian Ocean-wide tsunami warning has prompted mass evacuations and alarm in areas affected by a wave that killed hundreds of thousands of people in 2004.
Wednesday's 8.7-magnitude quake struck off the coast of Indonesia's Aceh province, the area worst hit by the 2004 disaster, and was followed by a series of powerful aftershocks.
Indonesia's disaster management agency reported that people rushed for high ground as sirens warned of the danger.
"The electricity is down, there are traffic jams to access higher ground. Sirens and Quran recitals from mosques are everywhere," said Sutopo, a spokesman for the agency who like many Indonesians goes by a single name.
An AFP correspondent in Banda Aceh, the provincial capital, said the ground there had shook for five minutes and caused telephone connections to go down.
"There are people trying to evacuate, some are praying and children at a school were panicking as teachers tried to get them out," he said.
"There are traffic jams everywhere as people are trying to get away from the coast - many are on motorcycles," the correspondent said.
Patients poured out of hospitals, some with drips still attached to their arms. In some places, electricity was briefly cut, The Associated Press reported.
"I was in the shower on the fifth floor of my hotel," Timbang Pangaribuan told El Shinta radio from the city of Medan. "We all ran out. ... We're all standing outside now."
He said one guest was injured when he jumped from the window of his room.
Memories of 2004
Many appeared fearful of a repeat of the devastating tsunami in 2004 that killed 270,000 people, three-quarters of them in Aceh.
But Edward Carwardine, a UNICEF worker on the island of Sumatra, told Al Jazeera that Indonesia was better prepared for the quake than it had been in 2004.
"This earthquake has brought back memories of 2004, but this time people were prepared and the warning was issued early. In Banda Aceh people were already evacuating the offices," he said.
"People are quite rightly moving to higher ground, moving away from the coastal areas as fast as they can. I think it's an indication of how much people have learned from the terrible experiences of a few years ago."
Al Jazeera's Syarina Hasibaun reporting from Jakarta said: "The police have evacuated from coastal areas, there were high tides near Aceh, people are worried there could be a bigger tsunami."
"I spoke to one man who was worried, even though the country is well prepared," said our reporter.
In Thailand, the Reuters news agency reported that people in the west coast Andaman province had heeded warnings to head for higher ground, with tsunami sirens sounding in resorts such as Phuket.
Al Jazeera's Aela Callan, reporting from Bangkok, said Thailand had closed Phuket airport and placed the army on alert.
"In those coastal areas they have frequent tsunami alerts so people know what is happening. All of that disaster preparedness has swung into action. Obviously nerves are quite frayed as we are seeing some large aftershocks," our correspondent said.
"There is quite a sense of panic here in Thailand. The phone network quite overloaded with people checking that friends and loved ones are ok."
Bonnie Muddle from Australia who is on holiday in Phuket, said people were being evacuated from popular resorts including Krabi and Phang Nga Bay.
"Everyone is getting a little concerned over here," she told AFP.
On Twitter @moui tweeted to @AJELive "Bangkok people who work in tall building (Silom, Sathorn, Asoke area) felt the quake."
Sri Lanka and India also issued tsunami warnings.
The quakes were also felt in Sri Lanka, where office workers in the capital, Colombo, fled their offices, in one hospital in Colombo patients were escorted from the building in wheelchairs and in bed.
Mahinda Amaraweera, Sri Lanka's minister for disastermanagement, called for calm while advising people near the coast
to seek safety.
The Hindustan Times tweeted "tsunami warning centre expects 6m waves off east coast," even though in Chennai, authorities shut down the city's port over fears of a potential tsunami.
Source: Al Jazeera