A 5.6-magnitude earthquake struck Indonesia's West Java province on Monday killing 46 people, the national disaster agency said, as rescue workers and authorities worked to determine the full extent of the damage.
The quake struck on land in Cianjur town, about 75 km southeast of the capital, Jakarta, at a depth of 10 km (6.2 miles), the weather and geophysics agency (BMKG) said, adding there was no possibility of a tsunami.
The head of the disaster agency (BNPB), told a news conference, 46 people had been killed and up to 700 injured.
Herman Suherman, a government official in Cianjur, told media that some residents were trapped in the rubble of collapsed buildings. News channel Metro TV showed what appeared to be hundreds of victims being treated in a hospital parking lot.
Several homes and an Islamic boarding school were damaged, while electricity in the area was down, disrupting communications, the disaster agency said.
Footage from Metro TV showed some buildings in Cianjur reduced almost entirely to rubble as residents huddled outside.
Muchlis, who was in Cianjur when the quake hit, said he felt "a huge tremor" and the walls and ceiling of his office were damaged.
"I was very shocked. I worried there would be another quake," Muchlis told Metro TV, adding that people ran out of their houses in panic.
In the two hours after the quake, 25 aftershocks were recorded, the BMKG said, adding there was a danger of landslides, especially in the event of heavy rain.
The quake was felt in Jakarta, shaking buildings and rattling furniture, and some people left their offices in the central business district, Reuters witnesses said.
Indonesia straddles the so-called Pacific Ring of Fire, a highly seismically active zone, where different plates on the earth's crust meet, causing earthquakes and volcanoes.
In 2004, a 9.1 magnitude quake off Sumatra island in northern Indonesia triggered a tsunami that struck 14 countries, killing 226,000 people along the Indian Ocean coastline, more than half of them in Indonesia.