A man already in custody for five months and deemed unfit to plead before a court may have to be moved from Cork Prison to another jail just to access required mental health supports.
The solicitor for Tansanqa Radise told a judge that his client faces a wait of six months to enter the Central Mental Hospital, and that he could not get a bed at the HSE's Carraig Mór centre in Cork because he had an address in Dublin.
Mr Radise was of no fixed abode when he was first arrested in early February for an alleged burglary.
Originally from Zimbabwe, Mr Radise was arrested in a house in Belgooly in Co Cork after being found there by the householder shortly after 7pm on February 6.
In February, Bandon District Court heard that at the time of his arrest he was the subject of a bench warrant that had been issued by Waterford District Court earlier the same week, and had also been arrested in connection with an alleged burglary in Dublin on February 2.
Mr Radise, 32, previously said he had been living in Ireland for 17 years and told Judge James McNulty at the most recent sitting of Bandon District Court that despite the efforts of his solicitor, he still did not have a bed.
He told the judge that he has bi-polar and schizophrenic disorders and referred to "favouritism" in terms of being able to access services.
His solicitor, Eddie Burke, told Judge McNulty that he has spoken to Carraig Mór and has been told that his client would have to be referred to another unit, St Michael's, but this can't happen because it is an "open door unit".
Mr Burke also said he has spoken with a doctor in relation to the case and that he has been told that Mr Radise could not get a bed in Carraig Mór because he is not a native of Cork and had a previous address in Dublin.
The court heard that there is only a part-time mental health facility in Cork prison, which is insufficient, and that Mr Radise cannot get a bed in the Central Mental Hospital.
Mr Burke said one option would be a move to the Midlands Prison.
Judge McNulty said the court has tried to facilitate treatment for Mr Radise and referred to the "bureaucracy" in the case.
"It sounds like it is a bureaucratic tangle as to where this man is going to be detained for his safety and his health and the safety of the community at large," he said.
Mr Radise said: "It's a big mess."
A medical report has said Mr Radise is not fit to plead, described as a "catch 22 situation" by Mr Burke.
The judge said he wants to consider the situation and the matter was adjourned until Macroom District Court tomorrow.