Mere minutes after an 8.7-magnitude earthquake hit waters off the western coast of Aceh in northern Sumatra, an aftershock of 6.5 hit various parts of Indonesia and neighbouring regions, according to the Indonesian Mitigation Agency.

Meanwhile, India's tsunami centre has warned people of a possible six-metre waves off the Andaman islands and the Malaysian Meteorological Department advised people in Penang, Kedah, Perlis, Langkawi and Perak to stay away from the coastline.

The U.S. Geological Survey said the quake's epicentre was 33 kilometres beneath the ocean floor, more than 430 kilometres from Indonesia's Aceh province.

Meanwhile, the Indonesian president said there was no immediate threat of a tsunami from the earthquake. Earlier, Indonesia has issued its own tsunami warning and an Indian Ocean-wide alert. "So far, there is no tsunami threat," he said on national television.

Earlier, even the Indian National Centre for Ocean Information Service issued a red high-level warning for the islands, and also put out lower alerts for the coasts of Andhra Pradesh and Tamil Nadu and the Pacific Tsunami Warning Centre issued tsunami watch for 28 countries -- Indonesia, India, Sri Lanka, Australia, Myanmar, Thailand, Maldives, Britain, Malaysia, Mauritius, Syechelles, Pakistan, Somalia, Oman, Madagascar, Iran, UAE, Yemen, Bangladsh, Tanzania, Mozambique, Kenya, South Africa and Singapore.