Slideshow ( 2 images )

NUSA DUA, Indonesia (Reuters) - A magnitude 6 earthquake struck off the Indonesian islands of Java and Bali on Thursday, the U.S. Geological Survey (USGS) said, killing three people in Java and damaging some buildings while causing panic among residents.

The quake, located in the Bali Sea, also shook buildings on the resort island and some residents briefly left their homes in Bali’s capital, Denpasar.

The annual meetings of the International Monetary Fund and World Bank are being held this week in Bali and attended by more than 19,000 delegates and other guests, including ministers, central bank heads and some leaders.

The three deaths in East Java occurred after buildings collapsed while people were sleeping, Sutopo Purwo Nugroho, a spokesman for Indonesia’s disaster mitigation agency, said in a statement.

The USGS put the epicenter at 40 km (25 miles) northeast of Sumberanyar on Java island.

Indonesia suffered a powerful 7.5 magnitude earthquake and tsunami last month on the island of Sulawesi that killed more than 2,000 people.