Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Florida judge ruled Thursday that federal prosecutors, led by a man who is now President Donald Trump's secretary of labor, broke the law when they signed a plea agreement with financier Jeffrey Epstein without notifying his sex abuse victims.

Epstein, 66, reached a nonprosecution deal in 2008 with then-Miami U.S. Attorney Alexander Acosta's office to halt a federal sex abuse investigation involving more than 30 teenage girls. Epstein could have faced a possible life sentence. Instead, he pleaded guilty to state charges, spent 13 months in jail and paid settlements to victims.

U.S. District Judge Kenneth A. Marra, in a 33-page ruling, said prosecutors violated the victims' rights by not informing them of the deal and instead sending a letter counseling them to have "patience."

"Particularly problematic was the government's decision to conceal the existence of the [nonprosecution agreement] and mislead the victims to believe that federal prosecution was still a possibility," Marra wrote. "When the government gives information to victims, it cannot be misleading."

Secretary of Labor Alex Acosta at an event in the East Room of the White House on Oct. 6, 2017. Evan Vucci / AP file

A Department of Labor spokesperson released a statement following the judge's ruling.

"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," it read. "The office’s decisions were approved by departmental leadership and followed departmental procedures. This matter remains in litigation and, thus, for any further comment we refer you to the Department of Justice."

In his ruling, Marra said Epstein and others operated an international sex ring.

"Epstein and his co-conspirators knowingly traveled in interstate and international commerce to sexually abuse Jane Doe 1, Jane Doe 2 and others, they committed violations of not only Florida law, but also federal law," Marra wrote.

"In addition to his own sexual abuse of the victims, Epstein directed other persons to abuse the girls sexually ... Epstein worked in concert with others to obtain minors not only for his own sexual gratification, but also for the sexual gratification of others."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A lawyer for Epstein did not immediately return requests for comment.

The Justice Department has opened a probe into how federal government lawyers handled the case, an official confirmed to NBC News earlier this month.

Sen. Ben Sasse, the chairman of the Senate Judiciary's oversight subcommittee, called for the Justice Department to "reopen its non-prosecution agreement so that Epstein and anyone else who abused these children are held accountable."

"Jeffrey Epstein is a monster and his victims deserve justice," added Sasse, R-Neb.

Attorney Brad Edwards, who represented several victims, applauded the ruling.

"Today’s order represents long overdue vindication for all of the victims of Mr. Epstein and his co-conspirators," Edwards said. "Unfortunately, this decision also highlights the failure of the United States government to acknowledge its obvious wrongdoing. Rather than work to correct the injustices done to the victims, the government spent 10 years defending its own improper conduct."

Lawyer Jeffrey Herman, who also represented women alleging they were abused by Epstein, called Marra's ruling a "step in the right direction."

Epstein — a wealthy money manager who was friends with the likes of Bill Clinton, Donald Trump and Britain's Prince Andrew — has been dogged for years by allegations that he sexually abused dozens of teenage girls at his Palm Beach mansion and elsewhere in the early 2000s.

In December, he struck a last-minute deal to avoid a civil trial that would have allowed some of his victims to finally testify against him in open court.

The deal included a financial settlement, the details of which were kept confidential, NBC Miami reported. It also included an apology from Epstein to Edwards, who had accused Epstein of trying to ruin his reputation as retaliation for having represented the accusers.

In the Thursday ruling, the judge detailed several instances of questionable communications and coordination between prosecutors and Epstein’s attorneys over a 9-month period starting in January 2007.

One communication discussed an apparent promise made between Acosta and Epstein's attorney Jay Lefkowitz.

Marra wrote: "U.S. Attorney Acosta then met with Lefkowitz for breakfast and Lefkowitz followed up with a letter stating, 'I also want to thank you for the commitment you made to me during our October 12 meeting in which you . . . assured me that your Office would not . . . contact any of the identified individuals, potential witnesses, or potential civil claimants and their respective counsel in this matter.'"

Marra said that a prosecutor sent an email to Epstein's lawyer detailing a plan to file charges in a separate Miami court "which will hopefully cut the press coverage significantly."

In a separate email, a prosecutor said that while they would mention Epstein's co-conspirators to a judge, “I would prefer not to highlight for the judge all of the other crimes and all of the other persons that we could charge," according to the court papers.

Other exchanges listed by the judge refer to "off-campus" meetings between prosecutors and Epstein’s attorneys as well as a request to email the assistant U.S. Attorney at his home address.

The desire to avoid putting communications in writing or outside of normal channels extended to the state prosecutor as well, the judge wrote. "On September 21, 2007, Palm Beach County State Attorney Barry Krischer wrote the line prosecutor about the proposed agreement and added: 'Glad we could get this worked out for reasons I won't put in writing. After this is resolved I would love to buy you a cup at Starbucks and have a conversation,'" the court papers say.

Marra also referenced a letter Acosta sent to Epstein lawyer Kenneth Starr, the former independent counsel whose recommendations led to the impeachment of then-President Bill Clinton. "I am directing our prosecutors not to issue victim notification letters until this Friday at 5 p.m., to provide you with time to review these options with your client," read the letter dated Nov. 30, 2007, according to the court papers.