(CNN) The Justice Department Wednesday filed to dismiss its remaining charges against Sen. Bob Menendez, bringing the legal case that has hovered over the New Jersey Democrat for years to a close.

An 11-week trial last fall resulted in a hung jury. Prosecutors had accused the senator of accepting bribes from Dr. Salomon Melgen, a wealthy ophthalmologist in Florida, in return for political favors. The charges against Melgen were also dropped.

Both men pleaded not guilty to all charges.

"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," DOJ spokeswoman Nicole Navas Oxman said.

"From the very beginning, I never wavered in my innocence and my belief that justice would prevail," Menendez said in a statement Wednesday. "I am grateful that the Department of Justice has taken the time to reevaluate its case and come to the appropriate conclusion. I thank God for hearing my prayers and for giving me strength during this difficult time. I have devoted my life to serving the people of New Jersey, and am forever thankful for all who have stood by me."

Read More