A judge ruled Thursday that federal prosecutors, including future Labor Secretary Alexander Acosta, violated the law when they did not tell victims the government had struck a deal not to prosecute Jeffrey Epstein, a politically connected billionaire accused of molesting dozens of young girls.

The ruling was a stinging rebuke for prosecutors and how they behaved in a grim, high-profile case that has drawn increased scrutiny in recent months. A Miami Herald investigation last year highlighted the allegations and Acosta’s role in cutting a non-prosecution agreement with Epstein, while a Justice Department office said it is exploring whether the federal prosecutors who reached the deal committed “professional misconduct.”

District Judge Kenneth A. Marra was blunt, ruling that prosecutors had acted improperly in reaching the agreement with Epstein — which stopped federal action in exchange for him pleading guilty to a state charge — without telling the victims. Marra, based in West Palm Beach, Fla., wrote in a 33-page ruling that the actions violated the Crime Victims’ Rights Act (CVRA), which entitles victims to know about significant events in their cases.

Marra wrote that he was “not ruling that the decision not to prosecute was improper,” noting he was “simply ruling that, under the facts of this case, there was a violation of the victims rights under the CVRA.”

Prosecutors did not give victims a chance “to affect prosecutorial decisions” and did not accurately tell them about what was happening, Marra wrote. Prosecutors sought “to conceal the existence” of the deal cut with Epstein “and mislead the victims to believe that federal prosecution was still a possibility,” he wrote.

“While the government spent untold hours negotiating the terms and implications of the NPA [non-prosecution agreement] with Epstein’s attorneys, scant information was shared with victims,” Marra wrote. “Instead, the victims were told to be ‘patient’ while the investigation proceeded.”

He added: “When the government gives information to victims, it cannot be misleading.”

Asked by reporters Friday morning about the judge’s ruling, White House Press Secretary Sarah Sanders said the White House was looking into the situation. Sanders also said she was “not aware of any changes” regarding Trump’s confidence in Acosta.

“My understanding is it’s a very complicated case, something we’re certainly looking into, but that they made the best possible decision and deal that they could have gotten at that time,” she said. “But again, that’s something we’re looking into.”

An attorney for Epstein did not respond to a request for comment about Marra’s ruling. The Labor Department pointed to the Justice Department’s long-standing defense of how prosecutors handled the case.

“For more than a decade, the actions of the U.S. attorney’s office for the Southern District of Florida in this case have been defended by the Department of Justice in litigation across three administrations and several attorneys general,” a spokesperson for the Labor Department said Thursday. “The office’s decisions were approved by departmental leadership and followed departmental procedures.”

They added that the case remains in active litigation and referred further questions to the Justice Department. The U.S. attorney’s office in the Southern District of Florida, which Acosta led between 2005 and 2009, declined to comment on the ruling.

Brad Edwards, an attorney representing some of the victims in the case, hailed the judge’s decision.

“It’s a clear victory, vindicating our clients and verifying exactly what we have been saying for over a decade,” he wrote in an email. “The government clearly violated the rights of dozens of victims and then sadly fought those same victims for 10 years trying to defend the improper agreement they constructed with Mr. Epstein. We are a step closer to correcting this injustice and with this ruling we have undoubtedly ensured that this type of mistreatment of crime victims never happens again.”

The allegations against Epstein and the fact that he had reached a deal had been publicly known, coming up during Acosta’s 2017 confirmation hearings to lead the Labor Department. The case surged back into the public eye in November, when the Herald published its investigation reporting it had identified approximately 80 women who said they had been sexually abused by Epstein between 2001 and 2006. The Herald report also detailed how Epstein had struck a deal that effectively ended an FBI probe.

Before the Herald’s report, Acosta’s name had been floated as a possible future attorney general in the Trump administration. After it was published, lawmakers responded with a wave of calls for an investigation into what happened.

The Justice Department revealed earlier this month that it had opened an investigation into how prosecutors handled the Epstein case, though the probe is likely to be of limited impact. That inquiry will be conducted by the Office of Professional Responsibility, which can result in findings that could lead to employees being fired. Acosta is no longer a part of the Justice Department, and it is unclear if he will still work for the government by the time the probe concludes.

Sen. Ben Sasse (R-Neb.), who chairs the Senate Judiciary Oversight Subcommittee, said he hoped the Justice Department used the ruling to revisit its agreement with Epstein.

“Jeffrey Epstein is a monster and his victims deserve justice,” Sasse said in a statement Thursday. “I’m relieved that the court agrees that it was wrong to hide this child rapist’s pathetically soft deal from his victims, in violation of federal law. The fact that it’s taken this long to get this far is heartbreaking and infuriating.”