It is “staggering” that a brain-damaged homeless man has been on remand for more than a year in Mountjoy Prison’s high dependency unit despite persistent reports he is of unsound mind and needs residential care, the president of the High Court has said.

Mr Justice Peter Kelly was told a senior HSE official had cancelled a residential care plan due to “resource issues” and it was being proposed to discharge him to access homeless services . He said this was a “truly awful situation and one that should not exist in a civilised state”.

A court appointed medical visitor had reported the man, while otherwise doing well in the high dependency unit (HDU), has “absolutely filthy” feet and hugely overgrown and curled toe nails, a rare nail disease known as ram’s horn not seen here in decades.

It appeared his feet were never washed during his year long remand and the doctor also described his bed linen as “appallingly filthy”, having not been changed in months.

The man’s situation, the doctor reported, was “all the more shocking” as he was on a unit under the care of consultant psychiatrists, doctors, nurses and wardens. The doctor was told by wardens they had a policy not to invade a prisoner’s “personal space” but the doctor considered that should not be applied to vulnerable adults.

The judge shared the doctor’s concern there must be many more vulnerable adult prisoners who are deficient in their ability to maintain their personal care and the situation “should be addressed at the highest level”.

He directed that papers in the case be served on the Minister for Justice, the HSE, the Irish Prison Service and the DPP and returned the matter to next week.

He commended the man’s solicitor, Danica Kinnane, of ME Hanahoe Solicitors, for writing to the court as a “last resort” to have the man made a ward of court after alleging the HSE was well aware of the man’s “chronic medical and social history” and was avoiding its statutory duty towards him.

The man, aged in his fifties and homeless for some time, has a history of mental disorder but does not meet the Mental Health Act criteria for admission to psychiatric units.

He was charged in November 2018 with assaulting two security guards who approached him when sheltering in the women’s toilets of a Dublin shopping centre.

Just after his arrest, a doctor at a Dublin Garda station said he was unfit to plead. He defecated in a Garda cell, covered himself with excrement, was charged the following day and remanded by the District Court to the HDU where he has remained.

In her letter to the High Court, Ms Kinnane said the HSE decided last April to apply to have the man made a ward but had made no application so far. She wrote as a “last resort” because the man had effectively served any prison term that might have been imposed on him were he fit to plead and because no one, including the District Court judges, believed it was in his or the public’s interest to release him back onto the streets.

The HSE is failing in its statutory duty towards the man whose rights, including to life, are being breached, she alleged.

Having received her letter last month, Mr Justice Kelly directed a medical visitor to assess the man and returned the matter to Thursday when he made directions for service on various parties address the matter.

Felix McEnroy SC, instructed by Ms Kinnane, said this matter was “shocking to the conscience” and so bad this very experienced law firm had, for the first time in its history, to seek wardship.

This was not just an “operational failure” but also a policy failure concerning provision of health services in prison.

The District Court has been frustrated for some time in finally disposing of the man’s case and the DPP’s office had known since March last there could never be a criminal trial as the man was not fit to plead, he said.

A Central Mental Hospital plan for the man’s move to a care unit was cancelled by an administrative officer at the “highest level” in the HSE for “resource” reasons and another doctor prepared a report with a view to the man accessing homeless services. Asking someone in this man’s condition to voluntarily access homeless services was “an impossibility”.

All this meant the man was in prison when he should not be, he cannot he discharged because he would be at risk and the situation was “utterly unacceptable”, counsel said.