A federal judge Wednesday granted a request to acquit Sen. Robert Menendez, D-New Jersey, and a longtime friend of bribery charges against them days after the Justice Department said it would seek to retry a case that ended in a hung jury last year.

Menendez and his co-defendant, Salomon Melgen, a Florida eye doctor, had faced 18 counts of alleged corruption. Seven of the charges related to bribery were resolved. Defense attorneys have argued that the charges were an attempt to criminalize a longtime friendship and there was no corruption in Melgen’s campaign contributions to the senator.

In his ruling Wednesday, U.S. District Judge William Walls said public corruption prosecutors failed to demonstrate that there was a clear exchange of payment for the promise to perform an “official act.”

According to a November 2017 report in The Washington Post by Alan Maimon and Devlin Barrett:

“Prosecutors said Menendez took gifts from Melgen, including a luxury hotel stay, private jet flights and campaign donations, in exchange for which he tried to help Melgen get U.S. visas for his girlfriends, intervened in the doctor’s $8.9 million billing dispute with Medicare, and assisted with a port security contract of the doctor’s in the Dominican Republic.”

The remaining 11 charges include bribery, conspiracy and fraud.

Abbe Lowell, Menendez’s lead lawyer, told the Associated Press Wednesday that a retrial “makes even less sense than it did last week and we hope it would be reconsidered.”

Prosecutors from the Justice Department filed notice last Friday saying they want a retrial “at the earliest possible date.” After Wednesday’s opinion, a Department of Justice spokeswoman told the AP that the agency is reviewing the ruling and considering next steps.

Menendez’s months-long bribery trial ended in a mistrial on Nov. 16, 2017, which showed how difficult it can be for the federal government to pursue corruption cases.

“The failure of the Government to produce evidence of facts either direct or circumstantial as predicates for proffered inferences evokes Gertrude Stein’s celebrated critique of her home town, Oakland: ‘There is no there there,’” Walls wrote in his dismissal of two of the counts.

Menendez is the first sitting U.S. senator to face a federal bribery trial in more than three decades, according to The New York Times. The last time the Justice Department tried to convict a sitting U.S. senator was in 2008, when Sen. Ted Stevens, R-Alaska, was found guilty of lying on financial disclosure forms to hide that he received gifts and expensive renovations to his house.

Stevens lost his re-election bid. Months later, the case was dismissed before his sentencing amid allegations of prosecutorial misconduct.

Menendez, who was first elected to the Senate in 2006, is seeking re-election this year. Despite the looming retrial, his smooth victory in the June election is expected, as it appears Menendez still has the full support of the New Jersey Democratic Party, according to The New York Times.

Walls said he will not preside over the retrial, a date for which has not been set.

Washington Post writer Devlin Barrett contributed to this report.

Follow the Bangor Daily News on Facebook for the latest Maine news.