Local media reports said the quake caused panic in many parts of Aceh and in neighbouring North Sumatra province.

Djoko Widodo, the police chief of West Aceh, told the Reuters news agency: "From what I see around my office, there's no damage but I see people running out of their houses. They are still outside, afraid to go back."

Aceh was one of the worst hit areas of Asia by the Indian Ocean tsunami in 2004 that killed more than 220,000 people.

Indonesia was the hardest hit nation in the 2004 tsunami, that was set off by a 9.3 magnitude quake, suffering about 168,000 deaths.