NEWARK, N.J. (Reuters) - The bribery case against U.S. Senator Bob Menendez survived a key test on Monday, as the federal judge overseeing his trial rejected a defense motion to throw out the most serious charges.

FILE PHOTO: Senator Bob Menendez speaks to journalists after arriving to face trial for federal corruption charges as his daughter Alicia Menendez (L) looks on outside United States District Court for the District of New Jersey in Newark, New Jersey, U.S., September 6, 2017. REUTERS/Joe Penney / File Photo

U.S. District Judge William Walls in Newark, New Jersey, allowed the trial to proceed on all charges, five days after suggesting he was inclined to dismiss the heart of the case based on a U.S. Supreme Court decision last year that narrowed the legal definition of public corruption.

Prosecutors have accused Menendez, a 63-year-old Democrat, of taking bribes from Florida ophthalmologist Salomon Melgen in exchange for using his office to help the doctor in a variety of ways.

Both men deny wrongdoing and say Melgen was acting out of friendship.

After prosecutors rested their case on Wednesday, defense lawyers renewed their argument that the Supreme Court’s decision last year vacating the corruption conviction of former Virginia Governor Bob McDonnell also undermined the bribery counts against Menendez.

Walls initially appeared ready to accept the contention that the McDonnell ruling invalidated a bribery theory known as “stream of benefits,” in which someone offers bribes essentially to keep a politician on retainer, rather than paying for specific acts.

But following additional filings over the weekend and more arguments on Monday, Walls said he believed the stream of benefits theory is still valid under the law.

The McDonnell decision has caused several other corruption convictions to be overturned, including those of former top New York state lawmakers Sheldon Silver and Dean Skelos.

During the trial’s first six weeks, prosecutors presented evidence that Menendez pressured federal officials to secure visas for Melgen’s girlfriends, resolve a port dispute involving one of Melgen’s businesses and change a Medicare reimbursement policy after the agency determined Melgen had overbilled it by millions of dollars.

In exchange, Melgen showered Menendez with private flights, luxury vacations and hundreds of thousands of dollars in campaign backing, prosecutors said.

The defense is expected to begin on Monday afternoon. It is unlikely that Menendez will take the witness stand, though his lawyers have not said whether he plans to do so.

The case has been closely watched in Washington, where Republicans hold a 52-48 edge in the Senate. If Menendez is convicted and either resigns or is expelled before Republican New Jersey Governor Chris Christie’s term expires in January, then Christie would name his replacement.