A powerful earthquake struck near Indonesia’s Moluccas islands on Thursday, prompting panicked residents to flee to higher ground, though a tsunami alert was later lifted and there were no immediate reports of casualties.

The quake had a magnitude of 7.1 and its epicenter in the sea was 86 miles northwest of the city of Ternate at a depth of 28 miles, according to the U.S. Geological Survey. More than 20 aftershocks occurred.

Indonesia’s geophysics agency lifted the tsunami warning after two hours because it detected only small waves in Ternate, Jailolo and Bitung.

Miftahudin, an official in Jailolo in the Halmahera area of the Moluccas, said residents had fled to the hills.