PHILADELPHIA (AP) — A federal appeals court on Friday refused to toss a corruption case against U.S. Sen Bob Menendez of New Jersey, casting aside his argument that charges he accepted gifts in exchange for political influence should be thrown out because of a constitutional clause protecting sitting lawmakers.

The 3rd U.S. Circuit Court of Appeals in Philadelphia said arguments from the indicted Democrat’s attorneys that the senator’s meetings with government officials were held to discuss policy matters, not to benefit a wealthy friend, should be heard at trial. Prosecutors allege the friend, Florida ophthalmologist Salomon Melgen, plied Menendez with gifts and campaign donations in exchange for political influence. Both men have pleaded not guilty to bribery and fraud charges.

Menendez’s attorneys didn’t immediately return requests seeking comment, and it wasn’t clear if they would appeal.

Appearing before the three-judge panel in February, Menendez lawyer Abbe Lowell hammered at a lower-court judge’s ruling not to dismiss the charges by claiming the judge erred in looking at Menendez’s purported motives for meetings he set up with several government officials.

The appeals court panel disagreed Friday, saying, “The acts alleged in this case were essentially lobbying on behalf of a particular party and thus, under the specific circumstances here, are outside the constitutional safe harbor.”

How a jury places Menendez’s actions in the context of the Constitution’s “speech or debate” clause will play a significant role in whether he is convicted on any of the dozen counts against him.

The clause dates to the 1780s and was written into the Constitution to fortify the separation of powers between the three branches of government and to protect members of Congress from having their legislative acts subjected to scrutiny by the other two branches.

Lowell said the lower court’s focus should instead have been on the “content of the contact,” or what happened in the meetings, which he said showed Menendez discussed port security and Medicare policy issues that were part of his legislative duties.

“That Senator Menendez framed those meetings using the language of policy does not entitle them unvaryingly to Speech or Debate protection,” the appeals court judges wrote. “Rather, for every mention of policy concerns there is substantial record support for the District Court’s findings that those concerns were instead attempts to help Dr. Melgen.”

Friday’s ruling comes a month after the Supreme Court set aside the bribery conviction of former Virginia Gov. Bob McDonnell, a Republican, deciding that the actions he took to benefit a businessman who gave him luxury gifts might have been distasteful but did not cross the line into illegal conduct.

The McDonnell opinion could bolster Menendez’s argument that the meeting was precisely the type of advocacy that the public expects of its leaders and could help his assertion that as a legislator, he had no direct ability to influence an executive branch decision.