A powerful magnitude 6.5 earthquake struck the island of Java in Indonesia just before midnight on Friday, with authorities reporting three deaths and damage to hundreds of buildings.
The US Geological Survey said the epicentre of the quake was located at a depth of 92 kilometres, about 52 kilometres southwest of Tasikmalaya.
Indonesia's national disaster management agency said the quake activated early tsunami warning systems in the south of Java, prompting thousands to evacuate from some coastal areas, but no tsunami was detected.
Tremors were felt in central and west Java.
Sutopo Purwo Nugroho, a spokesman for the disaster agency, said in a press briefing on Saturday three people had been killed, seven injured and hundreds of buildings damaged, including schools, hospitals, and government buildings in West and Central Java.
Dozens of patients had to be helped to safety from a hospital in Banyumas and were given shelter in tents, he said.
He posted on his Twitter page photos of people scouring collapsed buildings.
The quake swayed buildings for several seconds in the capital Jakarta. Some residents of high rise apartment buildings in central Jakarta quickly escaped their apartments, local media reported.
Indonesia's meteorology and geophysics agency said a magnitude 5.7 quake early on Saturday also struck south of West Java. It said the quake did not have tsunami potential.
Java, Indonesia's most densely populated island, is home to more than half of its 250 million people.