A judge convened a court sitting in a cell after prison officers told him that a prisoner was too dangerous to be brought into a public court.
In a highly unusual move, district judge Barney McElholm temporarily adjourned the sitting at the magistrates' court in Londonderry and went downstairs to the court cells to conduct the hearing.
The defendant, Barry Whittle (34), from Clareen Drive in the Strathfoyle area of the city, was arrested last Friday night and charged with causing grievous bodily harm with intent on a man by glassing him on the head. His alleged victim was also arrested by the police but was later released on bail.
When the remand hearing was called a prison officer told Mr McElholm that they were unable to bring the defendant up from the cells into the court dock because he had attempted to attack prison officers.
Defence solicitor Keith Kyle said he could not consult with the defendant, who has 67 previous criminal convictions, "for the same reason".
Mr McElholm said the defendant had an immediate problem in that he was hoping to apply for bail after attempting to attack prison officers.
"If he will not come up to court he is doing himself no favours. It is up to the Prison Service to assess if it is safe to bring him up", he added.
The senior prison officer on duty said it was her assessment that the defendant was too dangerous to bring into court. The District Judge said he would rise and hold the hearing in the prisoner detention area below the courtroom.
Court reporters then asked if they could be represented at the hearing, but the senior prison officer on duty said she had contacted the Prison Service headquarters and they replied that it would be too dangerous for a media representative to attend the hearing.
Mr McElholm then reconvened the court downstairs. He was accompanied by a prosecution and defence solicitor and by two court officials. Two prison officers stood alongside the defendant in a cell as the district judge stood immediately outside the cell door which remained open during the hearing.
Mr McElholm then returned to the courtroom and gave reporters a report of what had transpired downstairs.
He said on November 27 the police received a 999 call reporting an incident in the Strathfoyle area.
The caller said the defendant had glassed the injured party. The police went to the scene and found the injured party with serious injuries to his head.
The officers searched the locality and found the defendant, who also had injuries, and who told the police he had been attacked by the injured party who was armed with a crowbar.
The injured party said the defendant had attacked him with a bottle and he fought back to defend himself.
Mr McElholm said the defendant was currently on bail for two previous assault charges and he had also breached court bail conditions six times since August 14.
"As a result of this I concluded he was not a suitable candidate for bail. He was remanded in custody until December 17 and told he had the right to apply to the High Court for bail", the district judge said.