The earthquake occurred at a depth of 10 km (6 miles) at an area 168 km south-southeast of Ternate, the USGS said.