Fresh from his New Hampshire primary victory, Democratic presidential hopeful Bernie Sanders endorsed Cook County State’s Attorney Kim Foxx on Thursday, predicting she will “fundamentally transform our racist and broken criminal justice system.”

The endorsement was one of four the Vermont senator made on Thursday in races for top prosecutor spots. He also backed Democrat Junaid Afeef for Kane County state’s attorney and two candidates running for district attorney in Texas counties.

“I’m proud to endorse these progressive leaders for the important offices of state and district attorney,” Sanders said in a statement. “Now is the moment to fundamentally transform our racist and broken criminal justice system by ending mass incarceration, the failed war on drugs and the criminalization of poverty, and that’s exactly what they’ll do.”

Sanders is the second presidential candidate to back Foxx. Late last month, Massachusetts Sen. Elizabeth Warren threw her support behind the incumbent prosecutor, calling her a “seasoned advocate” and a “champion invested in rethinking the county’s approach to criminal justice reform.”

“Kim is an effective public servant who leads with compassion, and I’m confident that when reelected, Kim Foxx will continue to bring those qualities to the office,” Warren said in a statement.

Foxx said she’s honored to receive the latest endorsement.

“When I first ran four years ago, on a platform that included a holistic approach to criminal justice reform, it was different than what previous prosecutors had ever attempted,” Foxx said in a statement.

“The work has been difficult but this office has brought true change to Cook County while improving public safety for all. Being a progressive prosecutor requires boldness, innovation and a sense of urgency to help our communities. Having the support of Sen. Sanders shows that we have the right vision to keep moving forward. Our work isn’t done yet.”

The second boost from a Democratic White House hopeful marked some good news for Foxx in a tough week. On Tuesday, Special Prosecutor Dan Webb announced a new indictment of Jussie Smollett, accusing the former “Empire” star of faking a 2019 hate crime attack.

Coming just five weeks before the Democratic primary, the prosecutorial do-over breathed new life into an issue that has dogged Foxx’s re-election campaign.

Smollett was accused of making a false report to Chicago police and was indicted in March on 16 counts of disorderly conduct for allegedly lying about being attacked in a hate crime. Weeks later, the state’s attorney’s office abruptly dropped the charges.

Webb found no evidence that Foxx or anyone in her office engaged in any wrongdoing, but his decision to indict the actor gave new fodder for Foxx’s Democratic challengers , who have missed no opportunity to skewer for her office’s handling of the high-profile case.

Those challengers in the March 17 primary are former prosecutors Bill Conway and Donna More and former 2nd Ward Ald. Bob Fioretti.

Former prosecutor Christopher Pfannkuche and retired Cook County Circuit Court Judge Pat O’Brien are also in the race, vying for the Republican nomination.