WASHINGTON/NEW YORK (Reuters) - The U.S. Justice Department has dropped its bribery case against Democratic Senator Bob Menendez, lifting a cloud that had hovered over his expected 2018 reelection bid and removing a potential distraction for his party in a key election year.

FILE PHOTO: Sen. Bob Menendez (D-NJ) looks on during a Senate Banking Committee hearing on Capitol Hill in Washington, U.S. January 23, 2018. REUTERS/Aaron P. Bernstein/File Photo

Menendez, a longtime fixture of New Jersey politics, was accused of accepting gifts from a wealthy benefactor, ophthalmologist Salomon Melgen, in exchange for official favors.

His first criminal trial ended last year in a mistrial after a jury could not come to a unanimous verdict, and federal prosecutors had said this month they would seek to retry him.

“From the very beginning, I never wavered in my innocence and my belief that justice would prevail,” Menendez said in a statement. “I am grateful that the Department of Justice has taken the time to reevaluate its case and come to the appropriate conclusion.”

Abbe David Lowell, Menendez’s attorney, added: “We are pleased and grateful that the Justice Department made the right decision to end this case.”

The Justice Department’s decision marks a major political victory not only for Menendez, but also for the Democratic Party, which is hoping to regain control of the U.S. Senate in the upcoming midterm elections in November.

A court order posted on Monday afternoon formally dismissed the case at the Justice Department’s request.

The decision came days after U.S. District Judge William Walls threw out some of the bribery charges on the grounds that prosecutors had failed to show that about $660,000 in political contributions from Melgen to help benefit Menendez’s 2012 reelection campaign were part of any fraudulent scheme.

Walls said the mere fact that some of the money arrived around the same time that Menendez took actions that could benefit Melgen was not enough to prove a “quid pro quo” arrangement.

“Given the impact of the court’s Jan. 24 order on the charges and the evidence admissible in a retrial, the United States has determined that it will not retry the defendants on the remaining charges,” the Justice Department said in a statement.

The department also said on Wednesday that it was dropping federal charges against Melgen.

In a statement, Melgen’s attorney Kirk Ogrosky said his client “is now and has always been innocent.”

“We take no pleasure in seeing justice done at this stage in a case that should never have been brought. All that said, justice today is better than continuing on to inevitable acquittals on the remaining counts,” he added.

Melgen was separately convicted for Medicare fraud in Florida and is awaiting sentencing in that case.