Over a decade of bloody power battles in Libya have resulted in vital infrastructure falling into disrepair, culminating in the catastrophic death toll in Sunday's flood, politicians and analysts have said.
Wracked by conflict and division ever since a NATO-backed uprising toppled and killed longtime dictator Moamer Kadhafi in 2011, the North African country is currently ruled by two rival administrations.
In the west is the UN-brokered, internationally recognised Government of National Accord (GNA) based in the capital Tripoli and led by Abdulhamid Dbeibah, while a rival administration holds sway in the flood-ravaged east, backed by military strongman Khalifa Haftar.
The power battles have repeatedly degenerated into deadly conflict, but a 2020 ceasefire that brought an end to a bloody assault by Haftar's forces on Tripoli, has largely held.
On September 10, hurricane-strength Storm Daniel made landfall in eastern Libya, triggering torrential rain in the hills above the port city of Derna.
The deluge overwhelmed two upstream dams and sent a wall of water and debris down the normally dry riverbed that cuts through the city centre.
Whole neighbourhoods and their residents were washed out to sea, while much of the rest of the city was submerged.
Constructed in the 1970s, the two dams had not been maintained for years.
Like much of the city's crumbling infrastructure, they stood no chance against the weight of the floodwaters.
Libya's Tripoli-based prime minister blamed the tragedy on the absence of adequate development plans and the "effect of the years" on the dams.
"This is one of the results of the conflict and wars and the money that was lost," Dbeibah said during a televised meeting with ministers and experts.
- 'Ticking time bomb' -
According to Anas el-Gomati, an analyst at the Sadeq Institute think tank, "years of neglecting the dams of Derna, and failing to release pressure on the dam as the storm hit, acted like a ticking time bomb".
"The eastern authorities... have tragically and criminally miscalculated, and fallen short of their responsibility to protect their own citizens," he added.
Gomati said the decision to impose a curfew on the eve of the storm "didn't protect the citizens of Derna, instead, it trapped them in the path of an unstoppable force".
World Meteorological Organization chief Petteri Taalas said "most of the human casualties" could have been avoided if there had been proper coordination of early warning and emergency management systems.
In a study published in November 2022, Libyan academic Abdel-Wanis Ashour warned of the "catastrophe" that would befall Derna if the authorities failed to maintain its two dams, which had a joint capacity of 24 million cubic metres (about 850 million cubic feet).
But despite that warning, no work was done on either dam, though their maintenance had been factored into the state budget.
- 'Scale of devastation' -
Even before Libya became wracked by division, Kadhafi had long neglected Derna, which he viewed as a stronghold of opposition.
"Labelling this tragedy merely as a 'natural disaster' would be a grave understatement," Gomati said. "The scale of devastation witnessed in Derna was a direct consequence of the eastern authorities' negligence."
After the flood, the Tripoli-based Presidential Council urged the top prosecutor to open an inquiry into "this catastrophe" and prosecute anyone suspected of having committed "errors or negligence" leading to the collapse of the dams.
In the face of the devastation, age-old rivalries between Libya's historic regions of Tripolitania in the west and Cyrenaica in the east have given way to shows of solidarity.
Fund-raising campaigns have been launched on social media, while doctors, nurses and other volunteers have headed to Tripoli's Mitiga airport in a bid to reach the deluged city.
But the lack of coordination between the rival governments and the absence of a central authority has complicated the organisation of relief efforts.
"The east-west division will persist one way or another," predicts Libya specialist Jalel Harchaoui. "From the point of view of logistics and efficiency, of course, this divide is not a good thing."