(CNN) A federal judge has acquitted New Jersey Sen. Bob Menendez and his friend Salomon Melgen of several charges, according to a new order filed Wednesday.

The order from Judge William Walls comes days after the Justice Department announced that it would retry its case against Menendez. The original trial, which took place in the fall of 2017, ended after the jury failed to reach a unanimous verdict on any of the 18 counts in the case.

Defense attorneys had refiled a motion for acquittal after the mistrial.

The charges on which they were acquitted focused on political donations made by Melgen, a wealthy ophthalmologist from Florida, to political funds, including a Super PAC, that supported Menendez. Prosecutors argued that the donations were in exchange for political favors from Menendez and attempted to tie the timing of the donations to "official acts" performed by the senator. For example, prosecutors tried to demonstrate a connection between a $60,000 donation to Menendez's legal defense fund and the New Jersey Democratic State Committee and a request by Menendez the same day to meet with Ambassador William Brownfield about a cargo contract dispute involving Melgen.

Melgen is also alleged to have bribed Menendez with flights on his private jet and a luxurious vacation to Paris. Menendez is also charged with making false statements in relation to his Senate financial disclosure forms. Those charges still stand in the case.

Read More