A federal judge on Wednesday said the government had failed to prove some of the corruption charges against U.S. Sen. Bob Menendez and his codefendant, delivering a blow to prosecutors just days after they said they would retry the case.

U.S. District Court Judge William H. Walls acquitted Menendez (D., N.J.) and Salomon Melgen, a Florida eye doctor, of seven of the 18 charges.

The men are still charged with 11 counts of conspiracy, bribery, and honest services fraud. Menendez is also charged with making false statements on his financial disclosure forms.

After an 11-week trial, Walls declared a mistrial in November after jurors failed to reach a unanimous verdict on any of the counts. Jurors later told reporters that the vote was 10-2 in favor of acquittal, with several saying they believed the defense argument that Menendez and Melgen were simply friends who helped one another.

Menendez is accused of accepting scores of gifts from Melgen in exchange for advancing the doctor's personal and financial interests. Prosecutors say the senator helped obtain visas for Melgen's foreign girlfriends, lobbied federal officials to intervene in Melgen's $8.9 million billing dispute with Medicare, and pressured officials to protect Melgen's port-security contract with the Dominican Republic.

The judge acquitted the men on bribery counts that involved Melgen's political contributions to groups affiliated with Menendez, which totaled more than $600,000, finding that there was insufficient evidence to show that he made the donations in exchange for official acts by the senator. The judge ruled the government established sufficient evidence to sustain charges of bribery on counts that involved gifts like free trips on Melgen's private jet, a three-night stay at an upscale Paris hotel, and vacations at the doctor's villa in the Dominican Republic.

The ruling could reshape much of the government's case. Prosecutors had argued that Melgen's political contributions were central to Menendez's lobbying of high-ranking government officials such as Kathleen Sebelius, health and human services secretary under President Barack Obama, and William Brownfield, an assistant secretary of state.

Now, they may have to focus more on gifts like the Paris hotel stay — and the senator's failure to report them on his financial disclosure forms, which prosecutors said demonstrated concealment and consciousness of guilt.

The judge has not set a date for the new trial. Menendez has said he intends to seek reelection in November.

Abbe Lowell, Menendez's attorney, said, "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."

"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," Lowell said in a statement. "The decision of the DOJ 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 said prosecutors were "reviewing the court's order and considering next steps." The government could appeal the ruling.

Federal law and Supreme Court precedent prohibit "the exchange of a thing of value for an 'official act." For most things of value, Walls noted, "proof of an explicit promise to perform the official acts in return for the payment is not required."

Instead, prosecutors need only show that public officials like Menendez accepted a gift in return for performing official acts as opportunities arose.

The government faces a tougher burden of proof when the bribe involves a political contribution, the judge said, citing First Amendment rights of free speech.

"The government did not introduce evidence from which a rational juror could find an explicit quid pro quo. The only connection between Menendez's increased advocacy and the political contribution is that they occurred in a close temporal proximity," Walls wrote.

He said the prosecution's lack of evidence evoked Gertrude Stein's critique of her hometown, Oakland: "There is no there there."

"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," Walls wrote.

Kirk Ogrosky, an attorney for Melgen, said Walls' decision was "long overdue."

"There was simply never any quid pro quo agreement between my client and Sen. Menendez, and the court has now acquitted these two long-time Hispanic American friends on all counts that involved political contributions," Ogrosky said. "Hopefully, this Department of Justice will read the court's decision and drop the remainder of the case."

Menendez and Melgen renewed a motion for acquittal after jurors deadlocked in November. Walls ruled on that motion Wednesday. Melgen was convicted of Medicare fraud in a separate criminal case last year and awaits sentencing.