A strong 6.5 earthquake has rocked Indonesia's main island of Java, killing at least one person with reports of more deaths and injuries.
The tremor was measured at a depth of 56 miles and struck less than a kilometre east-southeast of the coastal town of Cipatujah, the US Geological Survey said.
The earthquake was felt in the capital Jakarta, about 190 miles from the epicentre, as well as several other towns on Java.
Authorities issued a tsunami warning for parts of Java's coastline after the quake struck at 11:47 p.m. and said there was potential for waves of between 0.3 meters (1 foot) and 0.5 meters (1.6 feet).
People ran out of buildings in panic in many areas and Indonesian television showed heavy traffic on roads as people left coastal areas.
National Disaster Mitigation Agency spokesman Sutopo Purwo Nugroho said a 62-year-old man was confirmed dead in the Ciamis region of western Java and that there were reports of more deaths and of injuries in the same region.
He also said there were reports that buildings had collapsed in the city of Tasikmalaya in western Java and in several western Java districts.
"Houses and other buildings are damaged in many areas," he said in a statement.
"We are still evaluating the impact of the quake and will give an update later," Nugroho said in a statement.
The US Geological Survey said the earthquake had a magnitude of 6.5 and was about 91 kilometers (56 miles) deep and located just inland.
Indonesian authorities reported a quake of similar magnitude offshore of Java.
Nugroho said strong tremors were felt for about 20 seconds in the capital of Jakarta and in cities and villages.
Indonesia's MetroTV said a general hospital in the central Java town of Banyumas was damaged and patients were evacuated.
Jakarta resident Web Warouw was on the 18th floor of a building in the capital when the quake struck.
"Suddenly, we felt dizzy, but constantly... We then realized it was a quake and immediately ran downstairs," the 50-year-old said.
People in the coastal city of Cilacap evacuated as a precaution fearing a tsunami, although no alert had been issued for the area.
Indonesia experiences frequent seismic and volcanic activity due to its position on the Pacific "Ring of Fire", where tectonic plates collide.
An earthquake struck the country's western Aceh province in December 2016, killing more than 100 people, injuring many more and leaving tens of thousands homeless.