Outdoor prayers after Indonesian quake

Hundreds of Indonesians have prayed out in the open next to rice paddies and in the streets after an earthquake flattened their town in western Java and left 310 of their community dead.

Muslim cleric Muhamad Jamhur led a congregation in prayer in an outdoor volleyball court on Friday just 200 metres from a mosque whose walls were left cracked and windows shattered by the shallow 5.6-magnitude quake that hit the town of Cianjur, about 75 kiilometres south of the capital Jakarta, earlier this week.

"After the disaster, we are still afraid. So we had to move here in this volleyball court, not in a mosque. I asked the congregation to stay on guard because disaster might strike again," Muhamad said.

Hundreds of aftershocks have rattled the mountainous region, where grieving and traumatised residents are sheltering in tents, awaiting supplies of food, water, and medicines that have been slowed by heavy rains and landslides.

Food vendor Asep Hidayat, who like many others lost his house in the quake, said he was thankful to be able to join in the prayers, even if not in a mosque.

"Prayer still needs to go on, even though we are in a shelter, prayer is an obligation," he said.

Indonesia's population is predominantly Muslim.

Rescue teams on Friday continued efforts to clear mud and debris and pull out any victims.

Twenty-four people remained missing but hopes of finding them alive were slim, the disaster mitigation agency 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 10km.

Poor construction standards also caused buildings to collapse, leading to many deaths, officials said.