CIANJUR, Indonesia — Searchers in Indonesia on Wednesday rescued a 6-year-old boy trapped for two days under the rubble of his home, which collapsed in an earthquake that killed at least 271 people as heavy monsoon rains lashed makeshift survivors shelters and forced a suspension of rescue efforts.

The death toll would likely rise as many people are still missing, some remote devastated areas remain unreachable and more than 2,000 people were injured in Monday’s magnitude 5.6 quake. Hospitals near the epicenter on the densely populated island of Java were already overwhelmed as patients hooked up to IVs lay on stretchers and cots in outdoor tents awaiting further treatment.

It was the deadliest earthquake to hit Indonesia since a 2018 Sulawesi earthquake and tsunami that killed about 4,340 people.

Many of those killed in this week’s earthquake were public school students who had finished classes for the day and were taking extra classes at Islamic schools when the buildings collapsed, West Java Governor Ridwan Kamil said.

More than 12,000 army personnel were deployed Wednesday to help search efforts by police, the search and rescue agency and volunteers, said Suharyanto, chief of the National Disaster Mitigation Agency.

Suharyanto, who like many Indonesians uses only one name, said aid is reaching thousands of homeless people who have fled to makeshift shelters where supplies are being brought on foot over the rough terrain.

He said rescuers recovered three more bodies on Wednesday and rescued a 6-year-old boy who was found alive next to his grandmother’s body under the rubble of his home.

Police, soldiers and other rescue workers used jackhammers, circular saws, farm equipment and their bare hands to dig frantically in the worst-hit area of ​​Cijendil village, where a landslide left tons of mud, rocks and trees.

The government seemed focused on finding bodies and, wherever possible, survivors. Authorities struggled to get tractors and other heavy equipment into landslide-hit villages over washed-out roads.

However, local residents complained that the government was too slow.

Muhammad Tohir, 48, was sitting in his living room with his family in Cijendil when the disaster struck. He and his family managed to escape, but his sister and her two children were crushed by a landslide a few kilometers from his home.

“When I got to my sister’s house, I was devastated by what I saw,” Tohir said. “Dozens of homes were buried by landslides. … It felt like the end of the world.” He said at least 45 people were buried alive under tons of mud.

Tohir and other residents searched for the missing using farming tools and managed to pull out two bodies. Rescue workers arrived two days later to help with the search.

“The government has been too slow in responding to this disaster,” Tohir said.

He said he wouldn’t give up until they could pull his sister and nieces out of the mud.

Water, food and medical supplies were distributed from trucks in several hard-hit areas, and authorities deployed military personnel to transport food, medicine, blankets and field tents.

Volunteers and rescuers set up shelters for the homeless in several villages in Cianjur district.

About 6,000 police, soldiers and volunteers dug through the rubble with their bare hands, shovels and pickaxes when heavy rain hampered their efforts.

Arif Yulianto, a search and rescue coordinator, said they were forced to halt their efforts on Wednesday afternoon because the rain made the landslide areas unstable. He said the search would resume early Thursday.

Suharyanto said 2,043 people were injured, including more than 600 who are still being treated for serious injuries, and that nearly 62,000 survivors have been taken to emergency shelters.

Most took shelter under makeshift shelters battered by the downpours. Few were fortunate enough to be sheltered by canvas-covered tents. They said they were running low on food, blankets and other supplies as emergency supplies were brought to the area.

About 40 people remained missing, Suharyanto said at a news conference. The rescue operations were concentrated in about a dozen villages in Cianjur where people were believed to be trapped.

More than 56,230 homes in Cianjur were damaged and more than 170 public buildings were destroyed, including 31 schools, he said.

About 100 of the 271 confirmed deaths were children, Suharyanto said.

“We are saddened by this earthquake, especially as children have been disproportionately affected,” said Yacobus Runtuwene of Wahana Visi Indonesia, a Christian humanitarian group working on children’s welfare.

With the magnitude of Monday’s earthquake, 5.6, no serious damage is usually expected. But the area is densely populated, and experts said the shallowness of the quake and the lack of earthquake-resistant infrastructure contributed to the damage.

More than 2.5 million people live in the rural, mountainous district of Cianjur, including around 175,000 in the capital of the same name.

President Joko Widodo visited Cianjur on Tuesday and pledged to rebuild infrastructure and provide aid of up to 50 million rupiah ($3,180) to each resident whose home was damaged.

The country of more than 270 million people is prone to frequent earthquakes, volcanic eruptions and tsunamis due to its location on the arc of volcanoes and fault lines known as the “Ring of Fire” in the Pacific Basin.

A powerful Indian Ocean earthquake and tsunami in 2004 killed 230,000 people in a dozen countries, most of them in Indonesia.