Mr Guedes’ story made the news last year, when the JPUH had to obtain a court order to get him to leave.

Director of governance at the hospital, Anna Hills, said Mr Guedes had “repeatedly refused all offers of appropriate accommodation organised by our local authority and social care partners, despite being fit for discharge”.

It is believed he was on hunger strike at the time of his death on Saturday and had only been back in hospital a short time.

A spokesman for WDC said: “Working with healthcare providers and other agencies, we did everything we possibly could to support Mr Guedes and we are very saddened to learn of his passing. Our thoughts are with his family.”