The allegations in the New York indictment were a depressing echo of those that Mr. Epstein faced in Florida more than a decade ago, when his perversion first came to light. In 2008, federal prosecutors for the Southern District of Florida , at the time led by Mr. Acosta, helped arrange a plea deal for Mr. Epstein that bent justice beyond its breaking point.

In exchange for pleading guilty to two state counts of soliciting prostitution from a minor, Mr. Epstein avoided a federal indictment that could have put him in prison for life. Instead, he served 13 months in a private wing of the Palm Beach county jail, where liberal work-release privileges allowed him to spend 12 hours a day , six days a week in his private office. Mr. Epstein paid restitution to some of his victims and was required to register as a sex offender — a designation that he later tried to have downgraded in New York to a less restrictive level.

In addition to short-circuiting federal charges, the plea agreement killed an F.B.I. investigation and granted immunity to any “co-conspirators.” As detailed last fall in a blockbuster series by Julie K. Brown of The Miami Herald, Mr. Acosta and his office worked unusually closely with Mr. Epstein’s legal team on the deal. Both sides also labored to keep the agreement secret until it was finalized — including from Mr. Epstein’s victims. This, a federal judge ruled in February, violated the rights of those victims, who have pushed for justice ever since.

At first glance, the Epstein saga looks like another example of how justice is not, in fact, blind — of how it tilts toward the powerful at the expense of the vulnerable. Mr. Epstein , who claimed to have made his fortune managing other rich people’s money, was not just wealthy; he was politically and socially wired, hobnobbing with such boldfaced names as Prince Andrew, Bill Clinton and Donald Trump.

He donated tens of millions of dollars to institutions like Harvard University, which he never attended but where he financed construction of a campus building and formed strong connections to faculty members and administrators.

Upon closer examination, this case offers an even more warped picture of justice. Mr. Epstein retained a cadre of high-price, high-profile lawyers who went after prosecutors with everything they had — at least according to Mr. Acosta. In 2011, facing criticism over the plea agreement, Mr. Acosta complained about having endured “a yearlong assault” by Mr. Epstein’s legal sharks. During his 2017 confirmation hearings to become labor secretary, Mr. Acosta claimed to have forged the best deal possible under the circumstances.

That is hardly comforting. It betrays a system in which the rich and well-connected can bully public officials into quiescence — or into pursuing a deal so favorable to the accused that it runs afoul of the law.