The Japanese meteorological agency also issued a bulletin saying there was "no possibility of a tsunami".
The Indonesian archipelago sits on the Pacific Ring of Fire where the continental plates meet causing frequent seismic and volcanic activity.
About 81 per cent of the world's earthquakes occur in this area which extends from Chile, northwards along the South American coast through Central America, the west coast of the United States, through the Aleutian Islands to Japan, the Philippine Islands, New Guinea, the island groups of the southwest Pacific, and to New Zealand.
Indonesia was the nation worst-hit when an earthquake triggered a tsunami in the Indian Ocean in December 2004. More than 168,000 people were killed in Aceh province alone during that event.