The Justice Department has dropped its plan to retry Sen. Bob Menendez (D-NJ) on corruption charges, an abrupt about-face that keeps him from another arduous trial and likely protects his place in the Senate.

The decision comes one week after a federal judge acquitted Menendez and his co-defendant, wealthy patron Solomon Melgen, of seven of the 18 counts they faced. An earlier trial had ended in a hung jury — with a reported 10 of the dozen members of the jury supporting acquittal.

“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,” a DOJ spokeswoman said in a statement Wednesday afternoon.

It’s become significantly more difficult to prosecute politicians for corruption since the Supreme Court tossed out former Virginia Gov. Bob McDonnell’s (R) conviction in 2016, and while the accusations that Menendez helped Melgen with his business interests as well as getting him visas for young women he was seeing in exchange for campaign contributions are rather unsavory, under current law it appeared unlikely that he’d be convicted.

Menendez celebrated the news.

“From the very beginning, I never wavered in my innocence and my belief that justice would prevail. I am grateful that the Department of Justice has taken the time to reevaluate its case and come to the appropriate conclusion,” he said in a statement. “I have devoted my life to serving the people of New Jersey, and am forever thankful for all who have stood by me. No matter the challenges ahead, I will never stop fighting for New Jersey and the values we share.”

Menendez faces reelection this year, and an ongoing trial would have cast a dark cloud over him and possibly could have ended his career. But New Jersey Democratic power-brokers including Gov. Phil Murphy, Sen. Cory Booker and (most importantly) party boss George Norcross had all rallied around him, all but erasing any chance of a serious primary challenge. While Menendez’s approval ratings are currently in the toilet, it’s hard to see the GOP mounting a serious challenge against him in the Democratic-leaning state now that he won’t be facing trial.