Federal prosecutors, including U.S. Labor Secretary Alexander Acosta, broke federal law when signing a plea deal agreement with Jeffrey Epstein, a judge ruled Thursday.

Epstein, a former hedge fund manager, helped to operate an international sex ring in which he recruited underage girls in Florida and from overseas. He was convicted of soliciting an underage girl for prostitution and served only about a year in an arrangement of jail time and work release that began in 2008.

Acosta, the federal prosecutor overseeing the case at the time, met privately with Epstein’s attorney in 2007 to cut the lenient deal, and the future Trump appointee agreed to keep the arrangement from Epstein’s victims, according to a November report in the Miami Herald, despite federal law requiring such disclosure.

In a 33-page opinion, U.S. District Judge Kenneth A. Marra said Epstein was not prosecuted under federal sex trafficking laws. Instead, Acosta, then the U.S. attorney in Miami, helped devise a non-prosecution agreement that gave Epstein and those who worked with him immunity from federal prosecution, the Miami Herald reported on Thursday.

“Petitioners and the other victims should have been notified of the Government’s intention to take that course of action before it bound itself under the [non-prosecution agreement],” Marra wrote.

The ruling did not issue a punishment. Marra gave the government and Epstein’s victims 15 days to come up with a resolution, though it’s unclear what that resolution could be.