A US judge has been removed from the bench for jailing 46 defendants in his courtroom after none of them admitted being responsible for a ringing phone.
The judge said he had known he had no legal basis for his actions
Judge Robert Restaino was presiding over a domestic violence case in the city of Niagara Falls in March 2005.
A commission on judicial conduct said Judge Restaino had acted "without any semblance of a lawful basis" and behaved like a "petty tyrant".
The judge has said he was under stress in his personal life at the time.
He has 30 days to appeal against the commission's decision.
In its ruling on Tuesday, the New York State Commission on Judicial Conduct recommended the removal of Judge Restaino for what its chairman called "two hours of inexplicable madness" on the morning of 11 March 2005.
It said the 48-year-old judge had been presiding over a series of domestic violence cases when he heard a mobile phone ring and "snapped".
"Every single person is going to jail in this courtroom unless I get that instrument now," he told the courtroom's audience, according to the commission.
"If anybody believes I'm kidding, ask some of the folks that have been here for a while. You are all going."
Security officers then attempted to find the phone but failed.
After a brief recess, Judge Restaino returned to the bench and again asked who had been responsible for the ringing phone.
When no-one came forward, the judge ordered that the entire courtroom audience of 46 people be taken into custody and set bail at $1,500.
"This troubles me more than any of you people can understand," the judge explained.
"This person, whoever he or she may be, doesn't have a whole lot of concern. Let's see how much concern they have when they are sitting in the back there with all the rest of you," he added.
"Ultimately, when you go back there to be booked, you've got to surrender what you got on you. One way or another, we're going to get our hands on something."
One defendant, according to the report, told the judge: "This is not fair to the rest of us."
"I know it isn't," Judge Restaino replied.
Rights 'deliberately violated'
The defendants were then taken to Niagara City jail, where they were searched and packed into crowded cells.
Fourteen people who could not post bail were later shackled and transported to another prison.
It was only later in the afternoon, when reporters began to ask questions about the ruling, that Judge Restaino ordered their release.
The judge told the commission he had known that he had no legal basis for his actions and that they had been "improper and inexcusable".
"He explained that he simply focused on attempting to locate the phone's owner and was frustrated by his inability to do so," the commission said.
The judge told the panel he had been under stress in his personal life at the time of the incident, it added.
Nevertheless, the commission's administrator, Robert Tembekjian, said the fundamental rights of 46 people had been "deliberately and methodically violated" and insisted there could be no excuse.
The judge's lawyer, Terrence Connors, told the Associated Press that he would exercise his right to appeal the decision within 30 days. He will remain in office during that time.