The earthquake was centered 1.99 degrees northern latitude and 126.50 degrees eastern longitude or 135 km southwest of West Halmahera at a depth of 10 km, the agency said in its official website.
The agency recorded at least four aftershocks of lower intensity within 30 minutes since the first earthquake occurred at 21.33 western Indonesian time.
The last aftershock with a magnitude of 5.0 occurred at 22.02 western Indonesian time, it said.
The National Disaster Mitigation Board (BNPB) said the first earthquake was felt strongly by local people for five seconds.
"The local residents a little bit panicked," BNPB spokesman Sutopo Purwo Nugroho said in a written statement on Wednesday night.
Reporting by Rangga Pandu Asmara Jingga.