A strong earthquake shook Indonesia’s densely populated Java island on Friday night, killing two people and severely damaging dozens of homes near the epicenter.

The magnitude 6.5 quake struck at 11:47 p.m. and was felt across the island, including about 200 kilometers (124 miles) away in the capital Jakarta, where office towers and apartment buildings swayed. Powerful tremors lasted as much as 30 seconds in places.

Panicking people ran out of buildings in many areas and roads were clogged with motorbikes, cars and trucks as people fled coastal areas in fear of a tsunami.

Ahmad Solihin, a food vendor in a coastal area of the Sukabumi region, said his village was jolted by a 20-second tremor that cracked walls in his home. He fled on his motorbike with his wife and two children after neighbors shouted that water was coming, he said.