(Reuters) -"They knew."
When hydrologist Abdul Wanis Ashour began researching the system of dams protecting the eastern Libya port town of Derna 17 years ago, the peril facing residents was already no secret, he said.
"When I gathered the data, I found a number of problems in the Derna Valley: in the cracks present in the dams, the amount of rainfall and repeated floods," he told Reuters. "I found also a number of reports warning of a disaster taking place in the Derna Valley basin if the dams were not maintained."
In an academic paper he published last year, Ashour warned that if the dams were not urgently maintained, the city faced a potential catastrophe.
"There were warnings before that. The state knew of this well, whether through experts in the Public Water Commission or the foreign companies that came to assess the dam," he said. "The Libyan government knew what was going on in the Derna River Valley and the danger of the situation for a very long time."
This week, the "catastrophe" that Ashour had warned of in the pages of the Sebha University Journal of Pure & Applied Sciences, unfolded just as he said it would.
On the night of Sept. 10, the Derna Wadi, a dry riverbed most of the year, burst the dams built to hold it back when rains pour into the hills, and swept away much of the city below. Thousands of people are dead and thousands more still missing.
Abdulqader Mohamed Alfakhakhri, 22, said he made it to the roof of his four-storey building and was spared, watching as neighbours on their own rooftops were washed out to sea: "holding their phones with lights on and shaking their hands and screaming."
With the bodies still being gathered from underneath flattened buildings and the seashore where they have been washing up, many Libyans are angry that warnings were ignored that could have possibly prevented the worst disaster in the country's modern history.
"A lot of people are responsible for this. The dam wasn't fixed, so now it's a disaster," said Alwad Alshawly, an English teacher who had spent three days burying bodies as a rescue volunteer, in an emotional video uploaded to the internet.
"It is human error, and no one is going to pay a price for it."
Spokespeople for the government in Tripoli and the eastern administration which governs Derna did not immediately respond to requests for comment.
Authorities tried to repair the dams above Derna as far back as 2007, when a Turkish company was awarded a contract to work on them. In his report, hydrologist Ashour cites an unpublished 2006 study from the Water Resources Ministry on "the danger of the situation."
But in 2011, Libya's long-serving ruler Muammar Gaddafi was toppled in a NATO-backed uprising and civil war, and for years after Derna was held by a succession of militant Islamist factions, including Al Qaeda and Islamic State.
The Turkish company, Arsel, lists a project on its website to repair the Derna dams as having begun in 2007 and been completed in 2012. The company did not answer its phone or respond to an emailed request for comment.
Omar al-Moghairbi, spokesperson for a Water Resources Ministry committee investigating the dams' collapse, told Reuters the contractor had been unable to complete the works because of the security situation, and had not returned when requested.
"Budgets were allocated but the contractor was not there," he said.
Even if the renovation work had been carried out, the dams would have failed, Moghairbi said, because the water level after Storm Daniel's deluge exceeded the structure's capacity, although the damage to Derna would not have been as severe.
Two officials at Derna municipality also told Reuters work on the dams contracted before Gaddafi's fall had been impossible to carry out afterwards because the city was occupied by Islamic State and besieged for several years.
Even after the city was recaptured by the administration running the east of the country, work did not resume.
In 2021, a report by Libya's Audit Bureau cited "inaction" by the Water Resources Ministry, saying it had failed to move forward with maintenance work on the two main dams above Derna.
The report said that 2.3 million euros ($2.45 million) had been earmarked for maintenance and rehabilitation of the dams but only part of the funds were deducted. It did not say whether those funds had been spent, or on what.
Critics of the authorities say they are to blame not only for failing to repair the dams, but for leaving residents of Derna in harm's way as the storm approached.
Speaking on the pan-Arab al-Hadath channel, Derna mayor Abdulmenam al-Ghaithi said on Friday he "personally ordered evacuating the city three or four days before the disaster."
However, if such an order was given, it does not appear to have been implemented. Some residents reported hearing police tell them to leave the area, but few seem to have left.
Other official sources told residents to stay: a video posted by the Derna Security Directorate on Sunday announced a curfew from Sunday night "as part of the security measures to face the expected weather conditions".
Even as the catastrophe was unfolding on Sunday night, the Water Resources Ministry issued a post on its Facebook page telling residents not to worry.
"The dams are in good condition and things are under control" it said. The ministry spokesperson did not immediately respond to a request for comment about the post.
The head of the World Meteorological Organization in Geneva, Petteri Taalas, said on Thursday that in a country with a functioning weather agency, the huge loss of life could have been avoided.
"The emergency management authorities would have been able to carry out evacuation of the people. And we could have avoided most of the human casualties."
Apportioning blame is never simple in Libya, where dozens of armed factions have waged war on-and-off with no government having nationwide authority since Gaddafi fell.
The internationally recognised Libyan government based in the capital Tripoli in the west of the country has no sway in the east, under a rival administration controlled by the Libyan National Army of Khalifa Hafter.
In Derna, the situation is even more troubled. Haftar's forces captured it from the Islamist groups in 2019 and still control it, but uneasily.
Libya's problem is not a lack of resources. Despite 12 years of chaos it is still a comparatively wealthy country, sparsely populated and pumping out oil that yields a decidedly middle-income per capita GDP above $6,000.
It has a decades-long history of massive engineering projects, above all on managing water in the desert. Gaddafi's Great Manmade River, for example, brings water some 1,600 km (1,000 miles) from aquifers deep under the Sahara to the coast.
But since Gaddafi's fall, the oil wealth has been disbursed among competing groups that control the administrative apparatus, becoming almost impossible to trace.
Prime Minister Abdulhamid al-Dbeibah, head of the Tripoli government, on Thursday blamed negligence, political divisions, war, and "lost money" for uncompleted work on the dams.
In the eastern-based parliament in Benghazi, speaker Aguila Saleh sought to deflect blame from authorities, describing what happened as an "unprecedented natural disaster" and saying people should not focus on what could or should have been done.
In Derna, residents have known about the danger posed by the dams for generations, said history teacher Yousef Alfkakhri 63, who rattled off the years of smaller floods dating back to the 1940s. But the terror of Sunday night was incomparable.
"When the water started flowing into the house, me and my two sons with their wives escaped to the roof. The water was faster than us and flowing between the stairs," he recalled.
"Everyone was praying, crying, we saw the death," he said, describing the rushing water as sounding "like a snake."
"We lost thousands in all the wars in the past ten years, but in Derna we lost them in one day."
(Additional reporting by Tom Perry, Angus McDowall, Maya Gebeily, Laila Bassam, Tarek Amara, Emma Farge and Mariana Sandoval; Writing by Peter GraffEditing by Frank Jack Daniel)