Secretary of Labor Alexander Acosta, who has been criticized for his role in a plea deal 10 years ago with a multimillionaire alleged to have abused dozens of underage girls, allowed the billionaire’s lawyers to largely set the terms of their client’s prosecution, a yearlong investigation by the Miami Herald found.

On Wednesday, the Herald released its multi-part report into the sex crimes of hedge fund manager Jeffrey Epstein in the early 2000s and the shockingly lenient punishment he received. The crimes described in the report are deeply upsetting: The Herald identified 80 victims, many of whom were preyed on because they were poor and in unstable homes, or on the verge of homelessness. They spoke of being paid to give massages and ultimately were coerced into sex acts, or of being tasked with finding other girls for him. Some described repeated and regular abuse by Epstein (one described going to his home “hundreds” of times), and one victim said Epstein raped her. A lawsuit pending in New York also alleges Epstein used an international modeling agency to traffic girls from Europe, Ecuador, and Brazil to house and use for his own sexual gratification.

Despite the vast scale of the abuse, Epstein pleaded guilty in June 2008 to just two prostitution-related charges in state court and was jailed for just 13 months in the Palm Beach, Florida, county jail. (Critics have pointed out that girls below the age of consent cannot be considered prostitutes but victims of trafficking.) Epstein was housed in a private wing of the jail and was allowed to leave six days a week for 12 hours at a time to work out of one of his comfortable offices. (Per sheriff’s department rules, sex offenders do not qualify for work release, the Herald noted.) He did register as a sex offender and was ordered to pay restitution to the three dozen victims who had been identified by the FBI at that point, but the victims’ payments came “only after Epstein’s attorneys exposed every dark corner of their lives in a scorched-earth effort to portray the girls as gold diggers,” the Herald reported.

To make matters worse, the plea deal he accepted effectively shuttered an ongoing FBI probe into whether there were other victims or guilty parties—it’s possible other powerful and wealthy people were involved—and the victims themselves were intentionally kept in the dark about the criminal proceedings against Epstein.

Acosta’s role in the case as a U.S. attorney placed him in the position to hold Epstein to account for the trauma he inflicted. Armed with an abundance of evidence and victim testimony, legal experts familiar with the case told the Herald, Acosta could have ensured Epstein was convicted on federal criminal charges and sent to prison for the rest of his life.

But instead, on one morning in 2007, he meet one of Epstein’s attorneys for breakfast at a Marriott 70 miles away from the prosecutor’s headquarters in Miami. The attorney was a former colleague of Acosta’s, and the two struck a deal that morning that ultimately arranged for Epstein and four of his accomplices to plead just to state charges and receive immunity from all federal criminal charges—along with “any potential co-conspirators.” The agreement that resulted was sealed until after it was approved by a judge, the Herald reported. As a result, no victims or victims’ advocates were aware of the agreement and given the opportunity to object. According to the Herald:

In email after email, Acosta and the lead federal prosecutor, A. Marie Villafaña, acquiesced to Epstein’s legal team’s demands, which often focused on ways to limit the scandal by shutting out his victims and the media, including suggesting that the charges be filed in Miami, instead of Palm Beach, where Epstein’s victims lived. “On an ‘avoid the press’ note … I can file the charge in district court in Miami which will hopefully cut the press coverage significantly. Do you want to check that out?’’ Villafaña wrote to [one of Epstein’s lawyers] in a September 2007 email.

The Herald reported that Epstein provided “valuable” information to federal investigators, and while the nature of that information is not known, the Herald speculated that it could have something to do with Epstein’s role as a witness against two Bear Stearns executives accused of corporate securities fraud at the time of the 2008 global financial crisis. (They were later acquitted.)

Acosta himself said he was pressured by Epstein’s team of lawyers, which included, among other prominent names, Jay Lefkowitz, a senior domestic policy adviser in the Bush administration; Harvard professor Alan Dershowitz; and former Clinton-era special prosecutor Ken Starr. When Trump nominated Acosta to become labor secretary in 2017, he was questioned about the Epstein case at the Senate confirmation hearing but argued that the plea deal had been necessary to ensure Epstein go to jail. “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 [as a sex offender] generally, and guarantees other outcomes, is a good thing,’’ he said.

A lawsuit in South Florida contends that Acosta and other federal prosecutors broke the law in not notifying the victims of court proceedings or allowing them the opportunity to appear at their abuser’s sentencing, in violation of the federal Crime Victims’ Rights Act. One police sergeant reported that FBI agents believed they had enough evidence to prosecute Epstein but were “overruled” by Acosta.

As Jordan Weissman noted for Slate in February 2017, Acosta is considered an accomplished and respected legal and political figure. While working for the Justice Department’s Civil Rights Division in the Bush administration, he worked to combat anti-Muslim bigotry and is the only Hispanic member of Trump’s Cabinet. Notably for those who would defend him against accusations of giving Epstein a cushy deal, he prosecuted corrupt lobbyist Jack Abramoff while working in Miami. Compared with Trump’s other Cabinet members, Acosta has managed to largely keep his head down and manage his vast department without attracting scandal.