The President of the High Court has said that it is reprehensible that he had to order the detention of a vulnerable, intellectually disabled man in a garda station overnight because the Health Service Executive could not find a place for him.

Mr Justice Peter Kelly said he had been told psychiatric hospitals in the relevant Dublin area were operating at 110% capacity and many people who needed inpatient care were not getting it.

The judge said he had been told that if someone had presented on Monday night with an acute psychotic episode, there would have been nowhere for them to go except a hospital emergency department. 

The judge said that was "a lamentable situation" but it was the situation on the ground.

He said Dr Brendan McCormack, an executive clinical director of mental health services with the HSE, had given evidence to him.

Mr Justice Kelly said services were so overstretched that he had to order the man's detention in a garda station with "the greatest reluctance".

He said he could not in conscience release him into a wet night in Dublin when he could be preyed on by unscrupulous people who preyed on him in the past.

The facility where the man had been accommodated for some years had said it could no longer deal with or accommodate him, after several incidents including an attempt to set fire to his computer.

The man is a ward of court, so the court has to decide on where he should be accommodated.

The judge made orders last night allowing the man's detention in a garda station.

A bed was found for him this morning in the psychiatric ward of a general hospital, but the court was told that placement was unsuitable.

Lawyers for the HSE told the court this afternoon that the executive would need more time to find a more suitable placement.

Mr Justice Kelly said he would make orders allowing the man to be detained in the hospital ward until Thursday, while the HSE continues its efforts to find an appropriate place. 

He said the hospital was a better option than a garda station.

He said the case was disturbing and upsetting for all involved, but he said he had no magic wand that could resolve the problems of the health service and the particular problems of the psychiatric service.

The court heard earlier that the man was very vulnerable.

A service for the intellectually disabled that had looked after him had increasingly had to seek court orders.

They included an order to stop him travelling to the US after a woman on the internet said she would marry him.