Oct. 28 (UPI) — President Donald Trump late Monday formally appealed his criminal conviction in New York, asking the state’s Supreme Court to throw the case out.

Arguing the trial was “fatally marred,” Trump’s defense said in its 96-page filing, obtained by Politico, that the charges against their client were political, the judge was compromised and evidence that was included in the trial should not have been.

“This case should never have seen the inside of a courtroom, let alone resulted in a conviction,” his lawyers said in the filing.

“This court should now reverse.”

Trump was convicted by a jury in May 2024 on 34 counts related to the falsification of business records to hide hush-money payments made to porn star Stormy Daniels to hide their alleged affair from the voting public in the run-up to the 2016 election, which he won.

New York District Attorney Alvin Bragg was able to indict Trump on felony charges for what would normally be misdemeanor document falsification by arguing that it was done in furtherance of another crime, specifically to conceal violating state election interference laws.

In the filing Monday, Trump’s legal team argued that New York District Attorney Alvin Bragg, a Democrat, “concocted a purported felony by stacking time-barred misdemeanors under a convoluted legal theory, which the DA then improperly obscured until the charge conference.”

They also said Justice Juan Merchan “fatally marred” the trial by allowing the introduction of official presidential acts in opposition to a Supreme Court ruling that came down months after the trial, which states the president enjoys immunity from prosecution for such alleged crimes.

Merchan should have also recused himself, Trump’s team continued, because he had donated $15 to ActBlue that was earmarked for Joe Biden‘s President campaign and $20 to two political action committees that support Democrats.

“Despite years of rifling through President Trump’s business, DANY could not find a felony charge. So it concocted an elaborate theory that has never before been pursued in this State and is plainly preempted by federal law,” Trump’s lawyers said.

“Like every criminal defendant in a New York courtroom, President Trump was entitled to a fair trial before a properly instructed jury and a neutral judge. Instead, he was convicted after a trial that featured repeated and clear violations of his constitutional rights, federal law and New York law, presided over by a judge who was required to recuse.”

Trump has repeatedly tried to overturn his conviction, including by seeking to move the case to federal court, where he, as president, could potentially invoke federal immunity in a case handled by his own Justice Department.