SANAMXAY, Laos -- Lao authorities ordered closer monitoring of hydroelectric facilities as they investigate why a dam in the country's southeast collapsed earlier this week, killing at least 27 people and leaving 131 missing. Floodwaters that rose to rooftops were slowly receding Thursday as villages began digging out of the deluge of mud from the dam's failure late Monday.

In a report issued Thursday, the state-run Vientiane Times said the Ministry of Energy and Mines had ordered closer monitoring of water levels in reservoirs and of conditions at dam sites.

It said the thousands of people stranded on rooftops and in trees had been rescued by Wednesday. Lao Prime Minister Thongloun Sisoulith described the disaster as the worst in years in the impoverished country, with more than 6,000 people displaced after the auxiliary dam of a joint venture hydroelectric project gave way after days of torrential rains.

Get Breaking News Delivered to Your Inbox

Thongloun said authorities were investigating if the dam's collapse resulted from heavy rainfall or from inadequate construction standards. The South Korean company responsible for building the dam, SK Engineering & Construction, also said it was trying to determine why the dam failed.

Villagers carry their belonging as they evacuate after the Xepian-Xe Nam Noy hydropower dam collapsed in Attapeu province, Laos, July 24, 2018. REUTERS

The Red Cross, South Korean government and other organizations were rushing water purifiers, food and other aid to shelters crowded with hundreds of displaced families evacuated from a half-flooded no-man's-land of orange mud and debris.

Initially Laos' state media reported that hundreds of people were missing and feared dead. Difficult communications and heavy rains, which have hampered rescue efforts, likely contributed to discrepancies in information about casualties.

The exact circumstances of the dam's collapse remain murky, and local officials said they had formed a committee to "seek common ground on the responsibilities and obligations for the tragic disaster," the Vientiane Times reported.

SK Engineering & Construction said the dam began failing Sunday, while Korea Western Power, another partner in the project, said the earth-fill dam began visibly weakening on Friday.

Villagers take refuge on a rooftop above flood waters from a collapsed dam in the Attapeu district of southeastern Laos, July 24, 2018. AP

SK Engineering sent its president and an emergency team to help with the rescue and repair effort. In a statement Thursday, it said it would help build lodging for those displaced.

"We will find out causes of the incident thoroughly and take necessary actions quickly," it said in a statement earlier this week.

The Thai partner in the dam project, the Ratchaburi Electricity Generating Holding Public Co., said the joint venture had sent experts to the area to investigate and analyze the situation and discuss with the authorities how to resolve the problem.

Monsoon rains clearly contributed to the disaster: A report by the intergovernmental Mekong River Commission said storms had caused water levels along the river to rise by 9-15 feet in the past week.

Continued heavy rain and strong winds forecast for the area could hinder recovery efforts, and risks from flooding persisted in the mountainous region.

But a flurry of dam building along the Mekong River and its tributaries, including those affected by this disaster, has raised concerns over environmental impact and other problems.

The $1.02 billion project encompassing several river basins in a remote corner of southeastern Laos is the first hydroelectric dam to be built by a South Korean company, and it was unclear how severe the damage would be to the overall plan. The dam was due to begin operating in 2019, with 90 percent of the power generated going to Thailand.

Laos has dozens of hydroelectric projects under construction and plans for sales of power to neighboring countries, now accounting for about a third of its exports, to grow substantially.

International Rivers, a non-governmental group generally critical of such projects, said the catastrophe showed the need to improve warning systems.

"With over 70 hydropower projects currently built, under construction and planned across Lao PDR - most of them owned and operated by private companies - authorities must immediately review how dams are being planned, designed and managed," the group said in a statement.