A federal judge in Newark has thrown out several bribery charges against Sen. Robert Menendez, but let most of the indictment against him stand as prosecutors prepare to retry the corruption case against the New Jersey Democrat.

In an opinion filed on Wednesday, U.S. District Judge William Walls denied defense requests for a judgment of acquittal on all charges, based on the evidence presented in the first trial against Menendez and his co-defendant, Salomon Melgen.

But quoting Gertrude Stein, the judge declared "there is no there there," in tossing seven major charges against the two men involving political contributions involving hundreds of thousands of dollars in contributions by Melgen to several political committees with ties to the senator.

The decision to acquit the two on seven of the 18 counts was not insignificant, according to Joseph Hayden of Pashman Stein Walder Hayden, a prominent New Jersey defense attorney.

"It's a third of the indictment," he said. "It's not a knockout, but it's a big gain for the defense."

Hayden said the dismissal of the counts "removes an area where the jury can compromise in the jury room."

Robert Mintz, a criminal defense attorney at McCarter & English and a former federal prosecutor, also said the judgment of acquittal on several bribery counts hands a victory to the defense, but left much of the case intact.

"While this decision will likely shorten the retrial, the heart of the case survived the judge's ruling," he noted.

That retrial will be without Walls. In a separate letter to attorneys in the case, the judge recused himself from further participation in the matter.

The Department of Justice last week announced its intentions to retry the case after a mistrial was declared in November, when deadlocked jurors said they were unable to reach a verdict.

Federal prosecutors have argued that Menendez traded the power of his office in exchange for six-figure campaign contributions, luxury hotel stays and private jet flights.

They claim that Melgen, an ophthalmologist and long-time friend of Menendez, sought the senator's intervention on the doctor's behalf in an $8.9 million Medicare billing dispute, as well as visa applications of Melgen's foreign girlfriends and a contested port security contract in the Dominican Republic that would benefit one of Melgen's companies.

But the high-profile case ended in a mistrial in November with jurors reportedly deadlocked 10-2 for acquittal.

The decision to retry the case carries political overtones. Menendez faces re-election this year and a retrial could play out during the campaign in a race that could prove crucial to control of the Senate.

Seeking even before the trial to dismiss the charges against Menendez, attorneys pointed to a U.S. Supreme Court decision that threw out the conviction of former Virginia Gov. Robert McDonnell, who had accepted gifts, loans and vacations from a Richmond businessman while arranging meetings for him for state officials and praising his product, a nutritional supplement derived from a substance found in tobacco.

The Supreme Court ruled that the former governor's activities on behalf of his patron were not considered "official acts."

In rejecting defense arguments pushing for dismissal of the entire case against Menendez and Melgen, Walls on Wednesday ruled that "a rational juror could find that defendants entered into a quid pro quo agreement."

The judge said all of Menendez's alleged official acts occurred during the "relatively short period of January 2006 through January 2013, and during the same period Melgen gave Menendez a stay in an upscale Parisian hotel, various flights without cost, and stays at Melgen's villa in the Dominican Republic."

"A rational juror could conclude from the activities of these defendants that there was an implicit agreement to exchange things of value for official acts," the judge wrote.

Yet the judge said prosecutors failed to prove that major political contributions to three New Jersey campaign committees were intended as bribes.

Those contributions included hundreds of thousands in donations to the New Jersey Democratic State Committee and the Fund to Uphold the Constitution and the Senate Majority PAC made in 2012.

Prosecutors charged that the contributions were made in exchange for the senator's advocacy on behalf of Melgen in Washington.

But Walls said the government "failed to produce evidence of facts either direct or circumstantial" to prove a quid pro quo.

"There is no there there," he said, citing Gertrude Stein by name in his ruling. "The government asks the court and a jury to fashion speculative inferences under the conclusory generalizations of context, chronology, escalation, concealment, and a pattern of corrupt activity--each of which is empty of relevant evidential fact."

He said from the evidence, a rational juror could not find that Menendez and Melgen were aware of the terms of the alleged quid quo.

In a statement, Menendez attorney Abbe D. Lowell said the court's decision to throw out parts of the case raises questions about why the government is seeking a retrial.

"With the court's decision, this case is now solely about the purest of personal hospitality allegations--stays at his friend, Dr. Melgen's family home and reimbursed trips on a plane that Dr. Melgen was flying anyway," said Lowell. "A jury rejected the government's facts and theory of bribery, and now the trial judge has rejected a critical legal theory on which the case was brought. The decision of the Department of Justice to retry the case makes even less sense than it did last week and we hope it would be reconsidered."

A spokeswoman for the justice department, Nicole Navas Oxman, said they were reviewing the court's order and considering their next steps.

Ted Sherman may be reached at

. Follow him on Twitter

. Facebook:

. Find

.