WASHINGTON—Sen. Robert Menendez (D-NJ) has lost his final opportunity for a federal appeals court to spare him from multiple corruption indictments, leaving him with only the hope of an intervention by the U.S. Supreme Court to avoid a trial on 22 felonies that could send him to prison for years.

The Democratic Senator is being pursued by the U.S. Department of Justice on charges of corruption, alleging that he solicited and received valuable gifts from a wealthy ophthalmologist—Dr. Salomon Melgen—in exchange for using his power and influence as a U.S. senator to try blocking a federal enforcement action against the eye doctor, whom the government charged with overbilling Medicare to the tune of $8.9 million.

The Justice Department took Menendez’s actions to a federal grand jury, which returned a 22-count indictment for a host of federal felonies. Menendez sought to have the indictment dismissed, in part on the ground that his actions were categorically protected by the Speech or Debate Clause of the U.S. Constitution.

Article I, Section 6, Clause 1 of the Constitution provided that for “any Speech or Debate in either House” of Congress, congressmen and senators “shall not be questioned in any other Place.” This extremely broad protection—called legislative immunity—goes all the way back to English’s parliamentary system in the 1600s, and is specifically designed to ensure that the democratic process is never hindered by the executive branch or the courts.

In 1966, the Supreme Court held that the Speech or Debate Clause invalidated a felony conviction of a corrupt congressman, Rep. Eddie Johnson of Maryland. But in that case, Johnson’s crime was taking a bribe to give a speech on the House floor regarding specific legislation, so it literally concerned a House member’s speech during legislative debate, which is the centermost activity protected by the clause.

Regarding Menendez, the U.S. Court of Appeals for the Third Circuit held that the senator’s actions were much different, falling outside the protection of legislative immunity.

The appeals court quoted the Supreme Court’s precedents in this area, where the justices held that legislative immunity’s purpose is to ensure Congress’ “independence,” not to make them “immune from criminal responsibility” at all times. Beyond literal words on the House or Senate floor—which are always protected—the Speech or Debate Clause shields “legislative activity,” which has “consistently been defined as [things] generally done in Congress in relation to the business before it.”

A three-judge panel of the Philadelphia-based appellate court held that Menendez’s actions do not fit within even this broad protection, and therefore allowed the criminal prosecution to move forward.

Menendez’s lawyers petitioned for the full Third Circuit to rehear the appeal en banc. On Tuesday, the court denied the petition.

Now Menendez’s only option is for the full U.S. Supreme Court to take his case. The justices have not heard a legislative immunity case since 1998.

The case is U.S. v. Menendez, currently on track for criminal prosecution in U.S. District Court for the District of New Jersey.

Ken Klukowski is senior legal editor for Breitbart News. Follow him on Twitter @kenklukowski.