A mains sewer pipe burst at Ayr Harbour after its concrete support crumbled, Ayrshire Live can reveal.
Engineers have been bidding to repair major damage to the infrastructure following the incident last month.
Officials from Scottish Water have now confirmed the reason behind the burst, which has led to a delicate salvage operation.
Potential environmental damage from raw sewage spilling into the nearby harbour has been rated "minimal" by water chiefs.

And they confirmed yesterday that a repair on the burst pipe has now been completed.
However, teams are set to remain on site for some time to come with significant road traffic management in place.
The one-way system at South Harbour Street is currently heavily restricted due to the ongoing works.
A Scottish Water spokesperson told Ayrshire Live: “The repair to the burst sewer pipe at Ayr Harbour has been successfully completed.
"The issue here appears to have been caused by a failure in the pipe’s concrete support.
"Investigations are ongoing to determine any further protection measures which can be put in place to help minimise the risk of similar issues happening in the future.”
Don't miss the latest Ayrshire headlines – sign up to our free daily newsletter here