in Maluku province at a depth of 29 kilometres.

The area was hit by at least two dozen aftershocks including one that measured 5.6 magnitude, Triyono said.

An AFP reporter in Ambon described scenes of panic as people fled their houses when the quake struck.

Architect Suryanto Soekarno said a construction site where he and his employees were working was rocked by the tremor.

"It was a really hard shock," he told AFP.

"Filing cabinets fell over and my employees ran away to save themselves. Some were injured but thank God only with minor wounds."

'No need to panic'

Initial reports said the quake struck offshore, but later analysis found it hit onshore, raising the potential for damage, according to Indonesia's national disaster mitigation agency.

Local BMKG head Oral Sem Wilar called for calm.

"People were panickingand started to evacuate in some places, but we are trying to tell them there's no need to panic because there's no tsunami threat," he told AFP.

The Southeast Asian archipelago is one of the most disaster-prone nations on Earth. It experiences frequent seismic and volcanic activity due to its position on the Pacific "Ring of Fire", where tectonic plates collide.

In August, five people died and several were injured after a powerful undersea earthquake rocked Indonesia's heavily populated Java island.

Last year, a 7.5-magnitude quake and a subsequent tsunami in Palu on Sulawesi island left more than 4,300 people dead or missing.

The force of the impact saw entire neighbourhoods levelled by liquefaction -- a process where the ground starts behaving like a liquid and swallows up the earth like quicksand.

Nearly