The lawyers representing Democratic Sen. Bob Menendez filed Sunday to have their client’s corruption trial declared a mistrial. The legal team argues that Judge William Walls has been “unfairly prejudicial” in his conduct.

The New Jersey senator is on trial along with his friend Dr. Salomon Melgen after an FBI investigation led to charges of corruption and bribery. The prosecution alleges that Menendez accepted cash and gifts in exchange for lending Melgen political assistance in his medical practice. Melgen has previously run afoul of the law, receiving a conviction for defrauding the Medicare program.

But in what some see as a long-term strategy to justify an appeal, the lawyers are arguing that Judge Walls has abrogated the defendants’ right to a fair trial because he has demonstrated bias.

“At bottom, however, Defendants’ concerns are typified by the Court’s parting words at [Thursday’s] hearing: ‘Life is not fair and so too is judicial discretion.’ Despite the light-hearted nature of the Court’s comment, the fact remains that judicial discretion must be exercised fairly — otherwise, by definition, it is an abuse of discretion. … Defendants submit that at key moments through this trial, the Court’s rulings have been unfairly prejudicial, inconsistent, and contrary to law.”

Furthermore, the legal team maintains that Walls “has erroneously excluded relevant and admissible testimony, documents, and witnesses called by the defense that would provide critical support” to the defense.

The lawyers are suggesting that Walls withheld key documents from the jury that might have helped Menendez and Melgen.

The mistrial motion is expected to be denied by Walls.

If convicted, Menendez and Melgan can request an appeal. But a guilty verdict will nonetheless put the senator in the position of either having to resign his office or being expelled by the Senate.

Follow David on Twitter