At least 14 people have died after an earthquake shook Indonesia’s main island of Java.

Dozens of buildings were damaged in the quake, sending residents into the streets of the capital Jakarta for safety.

The US Geological Survey said the magnitude 5.6 quake was centred in the Cianjur region in West Java province at a depth of 6.2 miles.

It killed at least 14 people and injured 17 others, National Disaster Mitigation Agency chief Suharyanto said.

Dozens of buildings were damaged, including an Islamic boarding school, a hospital and other public facilities, the agency said.

The quake was felt strongly in the greater Jakarta area. High rises in the capital swayed and some were evacuated.

Earthquakes occur frequently across the sprawling archipelago nation, but it is uncommon for them to be felt in Jakarta.

The country of more than 270 million people is frequently struck by earthquakes, volcanic eruptions and tsunamis because of its location on the Ring of Fire, an arc of volcanoes and fault lines in the Pacific Basin.

In February, a magnitude 6.2 earthquake killed at least 25 people and injured more than 460 in West Sumatra province. In January 2021, a magnitude 6.2 earthquake killed more than 100 people and injured nearly 6,500 in West Sulawesi province.

A powerful Indian Ocean quake and tsunami in 2004 killed nearly 230,000 people in a dozen countries, most of them in Indonesia.