A Wayne County, Mich., Circuit Judge has been removed from office after he had an affair with a woman who had a case before him.

The Michigan Supreme Court’s Judicial Tenure Commission found that Wade McCree had a sexual relationship with Geniene La’Shay Mott. Mott was suing her child’s father, Robert King, in a child-support case in front of McCree in 2012.

According to the JTC’s report, McCree sexted Mott from the bench, let her bypass courthouse security by entering via an employee entrance, let her wait in his chambers while he was on the bench, and had sex with her in his chambers.

But he can’t be sued for any of it. Judges are immune from civil lawsuits.

Last week, the U.S. 6th Circuit Court of Appeals cited that philosophy in concluding that McCree could not be sued by the father of his mistress’ child, even though his actions were “often reprehensible,” the Detroit Free Press reported.

Still, Detroit attorney Joel Sklar, who represents King, is preparing to take the McCree case to the U.S. Supreme Court, the Free Press reports. King claims McCree denied him access to a fair and impartial judge. King claims that McCree’s rulings were influenced by “sexual desires” and that he unfairly favored Mott in the case.

During the JTC proceedings, McCree’s defense claimed, “No harm, no foul.”

The JTC disagreed.

“The ‘harm’ was to the parties’ rights to a fair legal process and the public’s right to an impartial judiciary, and the ‘foul’ committed was the resulting violation of Michigan’s Code of Judicial Conduct,” the JTC report reads.

McCree also lied under oath during the proceedings about when and why he finally did recuse himself from the case. An email from McCree to Mott included in the report seems to show that McCree knew he was in the wrong.

“My Judicial Tenure Commission matter has me nervous, as you might expect,” he wrote. “I have to be real careful until this matter is put to rest. I can only ask humbly for your indulgence. Sorry. Second, you are the complaining witness on a case that is before me. Naturally if it got out that we were seeing each other before your (baby daddy’s) case closed, everybody could be in deep (expletive).”

That hypothesis proved prophetic. McCree has been removed from office, ordered to pay nearly $12,000, and, should he be re-elected in November, suspended for the entire six-year term.