Former President Trump’s legal team requested a mistrial in his New York fraud case Wednesday, claiming the trial judge and his principal law clerk’s purported bias against Trump has “tainted” the case.

“This appearance of bias threatens both Defendants’ rights and the integrity of the judiciary as an institution,” Trump’s counsel wrote in the 30-page motion.

Trump’s counsel pointed to posts made by Judge Arthur Engoron to a Wheatley School alumni page, which the judge appears to run, referencing the case or individuals involved with it, including Trump, his son Eric Trump and Trump attorney Alina Habba.

The motion cited New York code reading that “a judge shall not make any public comment about a pending or impending proceeding in any court within the United States or its territories.”

The former president’s legal team also addressed their concerns with Engoron’s principal law clerk, who has become an unwitting main character in the trial. They asserted the clerk has acted throughout the trial as a “co-judge,” conferring with Engoron via whispers or written notes before most orders have been issued.

“The principal law clerk is given unprecedented and inappropriate latitude,” Trump’s counsel wrote.

The filing also claimed the clerk has made “partisan political contributions in excess of strict limits,” including to groups that oppose Trump and support New York Attorney General Letitia James (D).

Trump’s attacks on the clerk, who frequently confers with Engoron, are what prompted a limited gag order barring him or any other parties from posting or speaking about the judge’s staff.

Trump’s Truth Social account falsely derided the clerk as Senate Majority Leader Chuck Schumer’s (D-N.Y.) “girlfriend” and included personally identifying information about her. A Schumer spokesperson called the post “ridiculous, absurd, and false” in a statement to The Hill.

As Trump and his counsel have repeatedly toed the line regarding their comments about clerk, the judge’s frustration has increased — at one point, unexpectedly calling Trump to the witness stand to explain himself.

A spokesperson for the New York attorney general’s office said in a statement Trump is “once again” attempting to “dismiss the truth and the facts, but the numbers and evidence don’t lie.”

“He can keep trying to distract from his fraud, but the truth always comes out,” the spokesperson said.