An aftershock sent hundreds scrambling for high ground on Wednesday in fear of more giant waves, as rescuers pulled bodies from the debris and aid trickled into this Indonesian town two days after a tsunami.
While the death toll jumped to 525, a search continued for 273 people still missing after huge waves smashed into a 300-kilometre stretch of coast along southern Java on Monday.
A light aftershock that shook Pangandaran beach sent some people running, while others crowded onto motorcycles or into cars and headed inland, as rumours circulated of a fresh tsunami.
The false alarm came after thousands spent the night on mosque floors or under makeshift shelters.
Government officials said as many as 54,000 people were displaced from wrecked fishing villages, farms and beach resorts, adding to the rehabilitation headache for authorities after an earthquake that killed more than 5,700 people in central Java less than two months earlier.
Aid trucks started to arrive for the thousands who lost their homes or who, fearing further tsunamis, had fled to hills above the coast. Many found refuge under plastic-sheeting shelters they made themselves while thousands stayed inside mosques at Pangandaran and nearby Cilacap port, among the hardest-hit spots.
No tsunami warning system was set up for the southern coast of Java after the 2004 Indian Ocean tsunami that left 230,000 killed or missing, including 170,000 in Indonesia.
Some officials considered the area, about 270 kilometres southeast of Jakarta, less likely to be hit by a tsunami than others in Indonesia.
Indonesia's 17,000 islands sprawl along a belt of intense volcanic and seismic activity, part of what is called the "Pacific Ring of Fire".