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

At least 20 people were killed and dozens injured Thursday in a strong earthquake that rocked Indonesia's remote Maluku islands, triggering landslides that buried at least one of the victims, the disaster agency said.

Terrified residents ran into the streets as buildings fell in around them when the 6.5-magnitude quake hit in the morning.

"At least 100 people were injured and more than 2,000 evacuated," said national disaster mitigation spokesman Agus Wibowo who gave the latest death toll in statement.

Among those killed was an infant, he said.

Earlier, local disaster agency officials said some victims had been killed by falling debris while one person was buried in a landslide.

Another victim died of a heart attack as the tremor hit, while one woman died after falling off her motorbike while fleeing to higher ground, officials said.

Residents of Ambon, a city of about 400,000 people, were seen helping injured residents in blood-stained clothes, while images showed wrecked homes with collapsed walls and rubble strewn on the ground.

Some patients fled a local hospital as the quake hit, prompting officials to set up makeshift shelters outside the building, an official said.

"The impact was felt across Ambon city and surrounding areas," said Rahmat Triyono, head of the earthquake and tsunami division at Indonesia's Meteorology, Climatology and Geophysical Agency (BMKG).

"Many people were woken up by the shaking... it felt like a truck was passing by."

The US Geological Survey said the quake struck about 37 kilometres (23 miles) northeast of Ambon 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 panicking and 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 60,000 people are still living in makeshift accommodation nearly a year after the double disaster, the Red Cross said this week.

In 2004, a devastating 9.1-magnitude earthquake struck off the coast of Sumatra and triggered a tsunami that killed 220,000 throughout the region, including around 170,000 in Indonesia.