Five people died from heart attacks in Aceh province as two powerful earthquakes struck off the coast of Indonesia. Four more were injured as they evacuated to higher ground.

Residents of Aceh are now taking stock as they recover from the twin quakes and the prospect of a tsunami - the first since the devastating tidal wave swept in from the Indian Ocean in 2004.

As Indonesians go about surveying the damage caused by the earthquakes, which measured 8.7 and 8.2 in magnitude, they are thankful that more lives were not lost.

"I really feel my prayers were answered," said Usman Basyah, 45, who lost one of his sons in the 2004 disaster that killed an estimated 170,000 people in Aceh province and 230,000 in countries bordering the Indian Ocean. "I'm so grateful."

"We've gone through enough trauma already," he said as he handed change to a customer at his small street stall.

Rahmi Novianti, 25, a housewife, agreed with Basyah. She said she could picture the 2004 disaster in her mind throughout the ordeal.

"Yesterday, as I was running out of my house, I could see the tsunami coming in my mind, the entire village again being destroyed.

"That it didn't happen really feels like a blessing," she added.

After the quakes, warnings were issued throughout the country, sending some citizens to seek refuge in inland buildings, such as mosques.

Mila, a 41-year-old woman, was one of them. She said: "It's dark here but I am scared to go home."

"I just want to stay alert because I fear there will be more quakes coming. We are human, it is only natural that we have fear, but I really wish we will all be safe."

Sirens sounded along the coastlines of the country and warnings spread fast for those who live in coastal towns to move to higher ground.

While many were expecting another tsunami to be triggered, they instead experienced flashbacks of the 2004 disaster.

The earthquake which took place on Boxing Day in 2004 measured between 9.1 and 9.3 in magnitude and was the third largest ever recorded.

It caused the Earth itself to vibrate up to one centimetre and triggered other tremors as far away as Alaska.

Residents of Banda Aceh take shelter in Baiturrahman Mosque after twin earthquakes struck off Indonesian coastReuters
Damage to bank in Banda Aceh, capital and largest city in Aceh provinceReuters
Residents sleep on floor of Baiturrahman Mosque in aftermath of tsunami scareReuters
Road congestion in Banda Aceh following evacuation warningReuters