A federal judge has dismissed four counts of an indictment against Sen. Robert Menendez but retained 10 others, finding the Constitution does not shield the New Jersey Democrat from trial for alleged corruption.

U.S. District Judge William Walls’ refusal on Monday to apply the Constitution’s Speech or Debate Clause to work Menendez’s office did on behalf of donor Salomon Melgen was anticipated by legal scholars.

The Supreme Court previously found the clause doesn't shield lawmakers from bribery charges or cover their attempts to influence executive branch agencies.

Menendez, Justice Department prosecutors allege, accepted bribes from Melgen in exchange for the senator’s intervention on various matters, including in a $8.9 million Medicare billing dispute, a Dominican Republic port contract and helping get visas for the eye doctor and businessman’s girlfriends.

The Speech or Debate Clause, in Article I of the Constitution, says members of Congress “shall not be questioned in any other Place” for “any Speech or Debate in either House" and perhaps is best known for permitting lawmakers to leak classified information during proceedings.

Temple University law professor Robert Reinstein, who in 1972 argued the landmark Gravel v. U.S. case at the Supreme Court – which extended the clause in some instances to congressional staffers – says he’s not surprised by Walls’ findings.

“They appear to be consistent with the governing case law that a senator's or representative's intervention with executive officials on behalf of a constituent is presumptively not protected by the Speech or Debate Clause,” he says.

“[A]lthough the Speech or Debate Clause shields members of Congress from prosecution for legislative acts and from the introduction of evidence of legislative acts to establish other offenses,” Walls wrote, “it does not bar prosecution for bribery.”

The judge further analyzed various bits of evidence in the case to determine if any were covered by the clause and found they were not, nor were mandatory financial disclosure forms lawmakers must file, for which Menendez faces a charge related to not disclosing gifts.

The judge retained charges against the senator for conspiracy and allegedly crossing state lines with the intent to accept bribes.

In a sliver of good news for Menendez, the former chairman of the Senate Foreign Relations Committee, Walls did dismiss four counts the senator faced tied to donations Melgen made to the Fund to Uphold the Constitution, a group that provided legal services on behalf of Menendez. The judge found the allegation the donations were made “in order to influence Menendez’s official acts, as opportunities arose” was too generalized.

But there’s a deluge of other bribery allegations in the case – including that Melgen provided private flights for Menendez and his guests, that he provided the senator with vacations at a Dominican Republic villa and five-star Paris hotel, and that he gave nearly $1 million in donations to Menendez’s campaign or supportive state and county Democratic Party groups and and a $600,000 earmarked gift to a super PAC – that Walls did not toss.

A spokeswoman for Menendez did not respond to a request for comment. The senator has strenuously denied accepting bribes from Melgen, whom he describes as a close personal friend. A similar defense was employed unsuccessfully by former Virginia Gov. Bob McDonnell, a Republican whose purported friend testified against him.

The investigation against Menendez began with allegations that he and Melgen visited the Dominican Republic to have sex with prostitutes, some of whom may have been underage. They face no charges related to those allegations.