The racially-motivated murder of a refugee by a mental health patient who had been released from a psychiatric hospital was "avoidable", a review has found.
Jeffrey Barry, 57, stabbed to death his neighbour Kamil Ahmad, 49, at their supported living flats on Wells Road in Bristol at about 2am on July 7 2016.
Barry, who has paranoid schizophrenia, had racially abused Kurdish refugee Mr Ahmad for years before he stabbed him to death and cut off his penis.
A review by Bristol Safeguard Adults Board found the murder was "the culmination of a developing race
It took place hours after Barry was released from a psychiatric hospital following a decision by a mental health tribunal, against the views of psychiatrists.
The review found this decision was based on "incomplete information" and had "tragic consequences".
Information sharing between Avon and Wiltshire Mental Health Partnership (AWP) and the psychiatric hospital "failed due to the absence of key personnel due to annual leave", it said.
The authors of the 43-page report, which refers to Barry as 'Mr X', have made 16 recommendations for Bristol Safeguarding Adults Board and organisations involved.
A risk assessment tool for housing providers has been commissioned and safeguarding guidance for agencies in relation to unconscious bias will also be reviewed.
An extended Bristol Hate Crime and Discrimination service was launched last year.
Louise Lawton, the independent chair of Bristol Safeguarding Adults Board, said: "Kamil was tragically murdered in a country where he was seeking safety and his death has affected many people across Bristol and beyond.
"The safeguarding adults review has highlighted some important learning and has identified opportunities which could have been taken to separate Kamil and Mr X.
"Of particular consequence is the process by which Mr X was discharged from a secure hospital on the day of Kamil's murder, how agencies worked together to coordinate care and assess risk, and opportunities to terminate Mr X's tenancy at the housing provision.
"The review also found Mr X had a significant history and pattern of racially motivated attacks against Kamil which culminated in his murder."
Barry had moved into the nine-bedroom converted Victorian house, run by the Milestones Trust, in 2010, with Mr Ahmad being a resident there in January 2013.
The first incident between them was recorded in June that year, with Barry attempting to enter Mr Ahmad's room uninvited.
Police were informed after Barry repeatedly punched Mr Ahmad in a racial attack in October and he was issued with a written warning about his behaviour by the Milestones Trust.
In the December, Barry was sectioned after punching Mr Ahmad. The Milestones Trust applied for an injunction but a judge rejected this as Barry was not in court.
Barry was issued with a final warning letter and Mr Ahmad was offered alternative accommodation but did not want to move as the new location was far from his support networks.
A further six incidents between Barry and Mr Ahmad were reported to the Milestones Trust between January 2013 and April 2016, when a safeguarding referral was made.
In May, Barry began "talking about murder and not caring if he spent the rest of his life in jail" but no further action was taken.
Later that month, Barry contacted police accusing Mr Ahmad of being a terrorist and claiming that he had raped a woman two years before.
Barry displayed an "escalating pattern of sexualised behaviour", and on June 10 staff at the Milestones Trust found 34 notes that Barry had pushed under their office door - including threats to kill Mr Ahmad.
He was sectioned under the Mental Health Act on June 13 after being filmed on CCTV performing a sex act, wearing only a police hat.
Barry was taken to Callington Road Hospital in Bristol but was transferred to the Cygnet Hospital Kewstoke in Weston-super-Mare on June 20 "as there was pressure to create additional capacity for new admissions", the report found.
The out of area manager, who should have maintained Barry's care, was on leave and so Barry's care coordinator was expected to attend ward rounds - though was not informed of this.
Kewstoke Hospital did not receive information regarding previous concerns about Barry's history, which would have been "particularly relevant" during the decision to discharge him.
Barry made an application for a mental health tribunal to review his detention, with a decision made that he should be discharged at 4pm on July 6.
This decision was made "without considering" the view of Barry's brother, the community psychiatric consultant or the Milestones Trust and was contrary to the advice of the hospital psychiatrist.
Barry was discharged without "adequate plans" being made, with the Milestones Trust only informed an hour before he was due to leave hospital.
An injunction was applied for to prevent Barry from returning to the flats but the earliest this could be heard was July 7.
At 1.30am that day, Barry telephoned the crisis team stating that he had drunk a litre of rum and felt like punching an Asian resident who lived in his flats.
He told staff he was "criminally insane and wasn't responsible" before ending the call. The crisis team called police using the 101 non-emergency number.
CCTV images showed Barry knocking on Mr Ahmad's door and leaving 45 minutes later, covered in blood.
He called 999 and reported that he had killed Mr Ahmad, stating: "Course it's murder isn't it? I'm going to say diminished responsibility."
Mr Ahmad had suffered 25 stab wounds to his face and eyes, as well as stab wounds to his stomach, right arm and wrist. His penis had been cut off after death.
Police discovered a note in Barry's room reading: "The fact is, I have acted out my entire psychiatric history. I'm very well. Sorry."
Barry was convicted of murder and sentenced to life with a minimum of 23 years in prison following a trial at Bristol Crown Court in November 2017.