White House press secretary Sarah Huckabee Sanders said Friday that the White House was "looking into" a ruling that Labor Secretary Alexander Acosta violated the law as a U.S. attorney by giving a favorable plea bargain to billionaire sex offender Jeffrey Epstein.

"My understanding is that’s a very complicated case, something we’re certainly looking into, but that they made the best possible decision and deal they could've gotten at that time," Sanders told reporters.

A federal judge in Miami ruled Thursday that Acosta and his prosecution team broke the law in a 2008 sex crimes case by closing it without the victims' knowledge.

Asked if the White House still had confidence in Acosta, she said, "Again, we’re looking into the matter, I’m not aware of any changes on that front."

Acosta has been criticized for his handling as a U.S. attorney of the investigation into Epstein, a wealthy and well-connected Florida resident. Epstein was eventually convicted two counts of prostitution in 2008 and served 13 months in county jail. Critics argue the penalty was far too light given the allegations that Epstein was involved in sex-trafficking and had abused dozens of women, many underage. He initially faced a 53-page federal indictment for related crimes.

The case was the subject of a long investigative piece published in November by the Miami Herald, in which many of Epstein's victims expressed anger over how it was resolved, especially that the details of the plea deal were initially kept secret. The article portrayed Acosta as bowing to pressure from Epstein's lawyers to limit the prosecution. Epstein was a key federal witness at about the same time in a case against a pair of Bear Stearns executives who were being charges of securities fraud.

During his Senate confirmation as labor secretary in 2017, Acosta defended his actions as part of a reasonable plea deal: "At the end of the day, based on the evidence, professionals within a prosecutor’s office decided that a plea that guarantees someone goes to jail, that guarantees he register generally [as a sexual predator] and guarantees other outcomes, is a good thing."

Federal judge Kenneth Marra ruled Thursday that the deal violated the Crime Victims' Rights Act. “Particularly problematic was the Government’s decision to conceal the existence of the [agreement] and mislead the victims to believe that federal prosecution was still a possibility,’’ Marra wrote.

Earlier this month, the Justice Department's Office of Professional Responsibility announced it had launched a probe into whether Acosta's actions as U.S. attorney amounted to professional misconduct.