A tsunami warning was issued for the whole Indian Ocean.
The quake struck 500km south-west of the city of Banda Aceh, on the northern tip of Sumatra island, at a depth of 33km, the US Geological survey said.
The quake was felt as far away as the Thai capital, Bangkok, and in southern India, residents said. Hundreds of office workers in the Indian city of Bangalore left their buildings, workers there said.
The quake was in roughly in the same area as a December 26, 2004, quake of 9.1 magnitude, which sent huge tsunami waves crashing into Sumatra, where 170 000 people were killed, and across the Indian Ocean.
In all, the 2004 tsunami killed about 230 000 people in 13 Indian Ocean countries, including Thailand, Sri Lanka and India.
The 2004 quake was at a depth of 30km along a fault line running under the Indian Ocean, off western Indonesia and up into the Bay of Bengal.
The quake was also felt in Sri Lanka and the southern Thai holiday island of Phuket, both of which were hit hard by the 2004 tsunami.
Thai Meteorological Department deputy chief Somchai Baimoung said there was no tsunami warning yet in Thailand. Provincial officials along the Andaman Sea coast were preparing for possible evacuation if necessary. – Reuters