There were no immediate reports of casualties but Indonesia's meteorology agency warned people to stay indoors, after five aftershocks were recorded.

In Jakarta, tremors were felt strongly for more than a minute, say witnesses.
In Jakarta, tremors were felt strongly for more than a minute, say witnesses. (AP)

A powerful 6.6-magnitude earthquake has struck off Indonesia's Java island, prompting some residents in the capital Jakarta to flee from buildings in panic.

Indonesia's meteorology agency (BMKG) said the earthquake hit 52 km off Banten province at a depth of 10 km on Friday, but did not trigger a tsunami warning. 

The magnitude was initially reported at 6.7 but downgraded to 6.6.

There were no immediate reports of casualties and BMKG warned people to stay indoors, after five aftershocks were recorded, the strongest reaching a magnitude of 5.7.

"From inside a house, it felt like a truck was passing through," BMKG chief Dwikorita Karnawati said.

In Jakarta, tremors were felt strongly for more than a minute, said witnesses.

READ MORE: Powerful earthquake hits Indonesia, tsunami alert canceled

'Pacific Ring of Fire'

Indonesia straddles the so-called "Pacific Ring of Fire", a highly seismically active zone, where different plates on the earth’s crust meet and create a large number of earthquakes and volcanoes.

"I was very scared, suddenly there was a quake and it was so strong," said 38-year-old nanny, Ani.

"When I felt it I directly grabbed my employer's baby and ran downstairs."

Another resident, Ade, 34, was on the 15th floor of a Banten apartment.

"I was in a Zoom meeting when people all shouted 'Earthquake!'," said Ade.

"The tremors were so strong and I was in shock, I couldn't immediately get downstairs, I needed to steady my body."

The quake was also felt in the provinces of West Java and Lampung, on Sumatra Island.

The agency said it had received initial reports of damage in Pandeglang in Banten, but provided no further details.

Speaking to Kompas TV, Banten governor Wahidin Halim said four homes had been damaged, one Islamic school had collapsed, and cracks appeared at a mosque.

Last month, a 7.4-magnitude earthquake struck the country's east, triggering a tsunami warning and also sending residents fleeing from their homes but causing only minor damage.

READ MORE: The top ten most costly natural disasters in 2021

Source: TRTWorld and agencies