The quake, late on Sunday, struck out at sea at a depth of 36 km (22 miles) with several smaller aftershocks, geophysics agency BMKG said.
Tremors shook buildings, alarming residents of some cities, and authorities urged people to move to higher ground.
“The quake was felt quite strongly and with an intensity that lasted quite long,” said Yusuf Latif, a spokesman for the search and rescue agency.
“There were no reports of damage or casualties in Ternate,” he added, referring to the city closest to the epicenter.
But some hospitals in Ternate, about 130 km (80 miles) from the epicenter, suffered minor damage and had to evacuate patients, media said.
Strong tremors were felt for a few seconds in the nearby seaside resort city of Manado, residents said, but no damage was reported.
Reporting by Wilda Asmarini, Fransiska Nangoy, Bernadette Christina Munthe and Kanupriya Kapoor; Writing by Gayatri Suroyo; Editing by Clarence FernandezOur Standards:The Thomson Reuters Trust Principles.