JAKARTA, Indonesia -- A strong earthquake shook the Indonesian capital Friday night and other cities on the country's most populous island of Java, killing at least 1 person amid reports of more deaths and collapsed houses. The quake struck at 11:47 p.m. and triggered a tsunami warning for parts of Java's coastline that was lifted about two hours later.

Panicking people ran out of buildings in many areas and Indonesian television showed heavy traffic on roads as people fled 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.

Get Breaking News Delivered to Your Inbox

"Houses and other buildings are damaged in many areas," he said in a statement.

Patients are evacuated outside a hospital following an earthquake in Banyumas, Central Java, Indonesia, Saturday, Dec. 16, 2017. A strong earthquake shook the island of Java just before midnight Friday triggering a tsunami warning for parts of the main island's coastline. Agus Fitrah / AP

The U.S. Geological Survey said the earthquake had a magnitude of 6.5 and was about 56 miles deep and located 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 in western and central Java.

A hospital in the central Java town of Banyumas was damaged and patients were evacuated, Indonesia's MetroTV reported.

Indonesia sits on the "Pacific Ring of Fire" and has frequent earthquakes and volcanic eruptions.