CIANJUR: Indonesian authorities struggled on Thursday to get aid to thousands of people displaced by a deadly earthquake in western Java, as rain-triggered landslides and difficult mountainous terrain hampered the efforts of rescue teams.

Monday's 5.6-magnitude earthquake in the town of Cianjur, about 75 km (50 miles) south of the capital Jakarta, killed at least 272 people and left thousands sheltering in tents with scant medical and aid supplies.

Suharyanto, the disaster mitigation agency chief, said on Thursday many had not received aid and nearly 5,000 volunteers were deployed to help distribute water, instant food, tents and diapers.

Distribution of aid was getting better as roadblocks eased, he said later on Thursday.

Survivors, including the elderly and small children, huddled inside military tents set up some distance away from devastated villages, while others queued up to receive aid packets from volunteers.

In Sukamanah village, residents said they were having to ration food and were short of supplies for children, including medicines, diapers and milk.

Ema Hermawati, wife of the village chief, said sanitation was lacking as trash started to pile up and there was no running water or portable toilets.

President Joko Widodo visited the site of the quake for a second time on Thursday and urged that aid distribution and rescue efforts continue as quickly as possible

"The conditions are steep," he said of the rugged terrain, adding there was a shortage of tents and water. "It's still raining and there are still aftershocks. The ground is shaky, so caution is needed."

Indonesia's meteorology and geophysics agency said aftershocks are expected to stabilise within the next week, but warned of landslides and floods due to the rainy season.

HOPES FADING

With dozens still missing, rescuers used earth diggers and other heavy machinery to clear mud and debris in search of victims. Some areas that have been cut off by landslides could only be reached by helicopter.

Hopes of finding survivors were fading, officials said.

Search efforts focussed on Cijedil village, where about 30 people were thought to be buried under a landslide, Joshua Banjarnahor of the national search and rescue agency, told reporters.

Food vendor Ahman, 52, said he lost his mother, his wife, and his daughter, who he said were buried when his stall on the edge of a cliff collapsed.

"I am not expecting them to be alive because they have been buried for four days. I'm letting them go," he said.

Indonesia is one of the world's most earthquake-prone nations, regularly recording strong earthquakes offshore where fault lines run.

Monday's quake was particularly deadly because it struck a densely populated area at a depth of just 10 km (6 miles). Poor construction standards also caused buildings to collapse, leading to many deaths, officials said.

Rebuilding Cianjur must adhere to seismic design codes, said David Sanderson, a disaster risk reduction expert with the School of Built Environment at Australia's University of New South Wales.

"Unless carefully managed, rebuilding can be sporadic, incomplete and not cognisant of future earthquake risk," he said.