Part of Northern Ireland could be engulfed in a major catastrophe if urgent upgrades to "worn out" water services are not carried out, a High Court judge warned.
Mr Justice Horner identified risks of homes being flooded and millions of litres of raw sewage spilling into an estuary with disastrous environmental consequences.
The potential dangers were set out as he removed a suspension on NI Water awarding contracts to carry out work on its network.
Under a Framework Agreement, the company tendered for contracts worth up to £1.7bn , involving both infrastructure and non-infrastructure projects.
But NI Water is being sued by Lagan Construction Ltd and the TES Group Ltd over the process.
The two legal actions prevented it from entering into deals with successful bidders.
With the litigation ongoing, lawyers for NI Water made an application to lift the restraint on awarding the contracts.
The court was told water services are in a "dire state", with massive investment required in a network of 16,000 kilometres of sewers, 1,030 waste water treatment works and 1,300 pumping stations.
The infrastructure has struggled to support growing population numbers, placing the network at risk of flooding without upgrades.
According to Mr Justice Horner every major town is affected by water or sewerage capacity constraints.
Drainage problems mean waste water treatment works in Belfast and Kinnegar, Co Down cannot cope during heavy rainfall.
Raw sewage then flows into Belfast Lough with serious consequences for its water quality, the judge pointed out.
"In the background there are potential disasters waiting to happen," he said.
Leaking sewerage systems siphoning from Strathfoyle, Co Londonderry near Lough Foyle was cited as one example of an "imminent possible catastrophe".
"Should that occur millions of litres of raw sewage will spill into the Lough Foyle estuary," the judge said.
"This will have untold environmental consequences for marine life. The shellfish industry in the event of such an escape will be eviscerated."
He added: "The overall picture painted to the court is one of a chronically under-funded industry struggling to cope with present day demands and urgently in need of a major capital injection to arrest years of decline."
It was acknowledged that the legal actions involve issues to be determined at a full hearing. NI Water faces the possibility of having to pay damages if the claims against it are ultimately upheld.
But at this stage Mr Justice Horner ruled that the public interest was overwhelmingly in favour of allowing it to award the contracts.
He said: "There is a significant risk, I find, that in the interim period while the suspension of the award of contracts continues, that a major catastrophe will engulf a part of Northern Ireland because of the worn out state of the water services."
Citing the situation in Strathfoyle, the judge added that more than 30 properties in the Ravenhill and Finaghy areas of Belfast are at risk of internal flooding from sewage.
"The defendant is in a position to award contracts in these areas immediately to ensure this does not happen," he added.
Confirming that the contract suspension is to be removed, he said any damages would represent adequate remedy for the plaintiffs in the ongoing actions.