The quake struck at 19:15 GMT Tuesday, 126 kilometers (80 miles) west northwest of Kota Ternate, Indonesia at a depth of 38.3 kilometers (24 miles), the USGS said.
There were no immediate reports of casualties or damage from the quake and no tsunami warning was issued.
Indonesia is prone to earthquakes due to its location on the Pacific "Ring of Fire," an arc of volcanoes and fault lines in the Pacific Basin. In December 2004, a massive earthquake off Sumatra island triggered a tsunami that killed 230,000 people in a dozen countries.