Federal prosecutors won't retry Sen. Robert Menendez and co-defendant Salomon Melgen, in a surprise decision Wednesday that brings an end to the long-running case against the New Jersey Democrat.

As recently as earlier this month, the Justice Department had vowed to retry Menendez on charges of bribery and fraud after its first attempt ended in a mistrial in November. But a court decision last week, in which several counts against Menendez were thrown out, persuaded prosecutors to reverse course. Prosecutors referenced that order in the motion they filed Wednesday in U.S. District Court.

Menendez and Melgen, a Florida doctor, had been accused of engaging in a quid pro quo relationship, in which Menendez allegedly gave government favors in exchange for gifts from Melgen — including trips on Melgen's private jet. Both defendants have denied any wrongdoing, arguing the gifts were merely evidence of their close friendship.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.