A federal judge on Wednesday refused to dismiss corruption charges against Sen. Bob Menendez before trial, rejecting an attempt by the senator to get his indictment tossed out.

U.S. District Court Judge William H. Walls did not rule on arguments made by Menendez attorneys that the U.S. Supreme Court’s reversal of a corruption conviction for former Virginia Gov. Bob McDonnell meant Menendez’s indictment should be thrown out. Walls said that can’t be determined until the case goes to trial.

“Whether the acts alleged in the superseding indictment satisfy the definition of an ‘official act’ under McDonnell is a factual determination that cannot be resolved before the government has the opportunity to present evidence at trial,” Walls wrote in his order. “Under McDonnell, evidence of non-official acts may still be relevant evidence in the prosecution of a federal bribery claim.”

A Menendez spokeswoman declined comment.

Last month, Menendez attorneys argued the McDonnell ruling set a legal precedent requiring the federal government to prove public officials performed acts “at the time of alleged quid pro quo,” rather than taking actions “as opportunities arose” for a donor. Attorneys also argued that lobbying the executive branch to take actions are not “official acts” by Menendez since he can’t take those actions on his own as a legislator.

The Supreme Court’s decision narrowed the scope of federal bribery law in a way that conflicts with the indictment against Menendez, his attorneys argued.

Prosecutors allege Menendez took luxury flights and a hotel stay from his top donor, Florida eye doctor Salomon Melgen, in exchange for official actions meant to further Melgen’s interests in Washington on matters ranging from visas, port security and Medicare payment policy. Melgen has been convicted on separate charges that he defrauded Medicare.

“The acts in this case are even farther removed from McDonnell, as none of the official acts that Senator Menendez allegedly sought to influence were acts that he could take or that even could be taken by anyone within the legislative branch,” Menendez attorney Abbe Lowell wrote in a brief. “Instead, the superseding indictment alleges that Dr. Melgen provided gifts to Senator Menendez to enlist his help in persuading decisionmakers in the Executive Branch to take favorable official acts on matters ranging from visas, to port security, to Medicare payment policy. Placing calls and having meetings to discuss these issues, even if to encourage others to take a particular action – something any citizen can do – are not “official acts” by Senator Menendez under McDonnell.”

In his order, Walls wrote that the allegations “are not legally deficient to prevent their going to a jury.” A trial is scheduled to begin Sept. 6. Prosecutors had said that Menendez’s new defense under the McDonnell ruling conflicted with his previous defense: the senator had argued last year that the constitution’s “speech and debate” clause protected his actions from prosecutors’ scrutiny. Walls rejected that defense.

Menendez’s seat will be on the November 2018 ballot. Because the trial is set to start next month, a verdict would most likely come before Menendez decides whether to run for re-election.