Detroit — An appeals court on Thursday overturned the drug conviction of a Black man, saying his rights were violated by a Detroit federal judge who was upset over delays in the case and declared, “This guy looks like a criminal to me.”

“Such remarks are wholly incompatible with the fair administration of justice,” the 6th U.S. Circuit Court of Appeals said.

U.S. District Judge Stephen Murphy III, who is White, apologized nearly two years later when the case against Leron Liggins finally was ready for trial. He explained that he was mad at the time “and I regret it.”

Nonetheless, the appeals court said Murphy should have removed himself, as Liggins’ attorney had requested. The court threw out a heroin distribution conviction and 10-year prison sentence and ordered a new trial with a different judge.

Allowing the conviction to stand “would substantially undermine the public’s confidence in the judicial process,” 6th Circuit Judge Eric Clay said in a 3-0 opinion.

Prosecutors said the remark was a reference to Liggins’ alleged conduct, not his appearance. But the appeals court said a “reasonable observer” could interpret it differently.

Murphy said he lost his composure in 2020 after Liggins repeatedly had switched between wanting to plead guilty and choosing a trial and also failed to get along with his second lawyer. He ended up with four.

“I’m tired of this case. I’m tired of this defendant. I’m tired of getting the runaround. This has been going on since February 6, 2018,” Murphy said in court.

“This guy looks like a criminal to me. This is what criminals do,” Murphy said. “This isn’t what innocent people who want a fair trial do. He’s indicted in Kentucky. He’s indicted here. He’s alleged to be dealing heroin, which addicts, hurts and kills people, and he’s playing games with the court.”

At trial in 2021, Murphy, a judge for 15 years, apologized and said he could be fair to Liggins.

“I lost my head,” he said.