The Northern Ireland Prison Service has been censured after an inmate died from Legionnaire's disease.
The prisoner, who was terminally ill, caught the infection in the healthcare unit at Magilligan. He died in hospital 11 days later on 8 February 2007.
The Health and Safety Executive (HSENI) said the approved code of practice for controlling legionella bacteria in water systems had not been followed.
The Prison Service has introduced measures to prevent a reoccurrence.
The prisoner had been transferred from the healthcare unit of Magilligan Prison on 29 January 2007.
HSENI conducted a detailed investigation to determine the likely source of exposure and discovered high levels of legionella bacteria in the unit's hot and cold water system.
Although it was a breach of Article 5 of the Health and Safety at Work (Northern Ireland) Order 1978 no criminal proceedings could be taken against NIPS because of Crown immunity.
The head of HSENI's major investigation team Louis Burns said: "The system for managing health and safety at HMP Magilligan had not been effective in controlling this well-known risk.
"The standard was far below what is appropriate for a prison."
Director General Robin Masefield said he accepted the findings but stressed that there were many mitigating circumstances.
"It is clear from the HSENI finding that, where more than one body is responsible for the management and oversight of contracts, clear and accountable reporting procedures need to be in place.
"In this instance, the private company which was responsible for the maintenance and inspection of the water treatment programme at the prison were not directly under contract to the Prison Service, but were part of a wider Crown estate contract.
"Unfortunately, where the need for remedial work was identified, as in this case, it proved to be a less than satisfactory arrangement."
Mr Masefield said the Prison Service had carried out a "rigorous" internal investigation to supplement the HSENI probe.
He added that it had also put in place a series of important changes to address the shortcomings identified by the inspectorate.