A prisoner who died after overdosing on prescribed medication stockpiled drugs
The Northern Ireland Prisoner Ombudsman said several opportunities to help Patrick Kelly had been missed while he was on remand at Maghaberry high security jail last year.
In a critical report, which makes 21 recommendations for improvement, investigators said prison officers and nurses overlooked crucial medical documents and failed to recognise that Mr Kelly was at high risk of self harm.
The report said: "Mr Kelly recognised his own risks and asked not to be allowed to retain his tablets as he was afraid he would take them all at once. Unfortunately his prophetic request was only briefly heeded.
"After four days on "supervised swallow" he was returned to "in-possession" status, without any protective measures in place to mitigate the risk of overdosing. He appears to have hoarded his repeat prescriptions and ultimately used them to overdose."
Mr Kelly was remanded into custody at Maghaberry prison in Co Antrim for two short periods in February 2015.
On the second occasion he overdosed on drugs prescribed for physical and mental health problems and died two days later an an outside hospital.
A post mortem examination attributed his cause of death to "probable drugs toxicity in association with coronary artery atheroma".
The Ombudsman said Mr Kelly's problems were clearly highlighted in documents that accompanied him on committal to jail but wardens and medics instead relied on self-reports and his immediate presentation.
The significance of a forensic medical officer's assessment which stated he was at high risk of self harm was also not recognised or shared.
"Several opportunities to address Mr Kelly's risks were consequently missed," the Ombudsman said.
Investigators said the person who most probably allowed Mr Kelly to return to holding his own medication had no recollection of making the decision.
As a result of serious concerns about the management of his medication and the apparent link to his death, the Ombudsman also raised concerns with the South Eastern Health and Social Care Trust.
In a statement, the Trust said it regretted Mr Kelly's death.
A spokeswoman said: "The Trust confirms that actions have been taken to address the professional practice issues identified within the reports and provides assurance that learning from these reviews will be used by our staff to further improve the provision of healthcare within prisons.
"Delivering healthcare in a prison setting is challenging and complex.
"Despite the challenges, our healthcare staff who work with prisoners do so because they are motivated to do their best to improve health outcomes for their patients .
"The Trust regrets the death of Mr Kelly and extends sincere sympathy and condolences to his family."