A U.S. attorney’s office under Alex Acosta “bent over backwards” for Jeffrey Epstein, Acosta’s number two said in a 2007 letter to Epstein’s lawyer.

Acosta, now secretary of the Labor Department, defended his handling of the Epstein case Wednesday.

But the letter shows Acosta’s office catered to the accused sex trafficker throughout the negotiations.

A U.S. attorney’s office under current Labor Secretary Alex Acosta’s leadership “bent over backwards” for accused child sex trafficker Jeffrey Epstein while negotiating a non-prosecution agreement, Acosta’s assistant U.S. attorney wrote in a 2007 letter to Epstein’s attorney.

The U.S. Attorney’s Office for the Southern District of Florida granted federal immunity to Epstein and many of his associates under the 2007 agreement in return for Epstein pleading guilty to state-level charges. Acosta served 13 months at a county jail — instead of a state prison — and was allowed to leave on work release for 12 hours a day, six days a week.

Acosta’s handling of the deal is facing new scrutiny after federal prosecutors in New York charged Epstein in July with sex trafficking of underage girls. The new charges center on Epstein’s alleged sex trafficking in New York, which isn’t covered by the Florida agreement.

But Acosta’s office catered to Epstein throughout the negotiation, according to a December 2007 letter that Acosta’s number two, Assistant U.S. Attorney A. Marie Villafana, sent under Acosta’s letterhead to Epstein attorney Jay Lefkowitz.

Villafana told Lefkowitz that she felt like she “bent over backwards to keep in mind the effect that the agreement would have on Mr. Epstein and to make sure that you (and he) understood the repercussions of the agreement.”

“For example, I brought to your attention that one potential plea could result in no gain time for your client; I corrected one of your calculations of the Sentencing Guidelines that have resulted in Mr. Epstein spending far more time in prison than you projected; I contacted the Bureau of Prisons to see where Mr. Epstein would be eligible for the prison camp that you desired; and I told you my suspicions about the source of the press ‘leak’ and suggested ways to avoid the press,” Villafana wrote.

“Importantly, I continued to work with you in a professional manner even after I learned that you had been proceeding in bad faith for several weeks — thinking that I had incorrectly concluded that solicitation of minors to engage in prostitution was a registrable offense and that you would ‘fool’ our Office into letting Mr. Epstein plead to a non registrable offense,” she continued, adding:

“Even now, when it is clear that neither you nor your client ever intended to abide by the terms of the agreement that he signed, I have never alleged misconduct on your part.”

A Justice Department spokeswoman told the Daily Caller News Foundation in a phone call that Villafana declined to comment and would not be made available for interviews.

The letter is included in court documents stemming from a still-ongoing lawsuit Epstein filed against an attorney representing some of his alleged victims. Journalist Conchita Sarnoff first reported on Villafana’s letter in her 2016 book on Epstein, “Trafficking.”

A Department of Labor spokeswoman sent the DCNF a letter Acosta emailed to Epstein attorney Ken Starr in December 2007.

The letter, first reported by the Miami Herald in November 2018, shows Acosta complaining about unethical tactics from Epstein’s lawyers and raising concerns about the strength of the agreement.

“Some in our office are deeply concerned that defense counsel will continue to mount collateral challenges to provisions to the agreement, even after Mr. Epstein has entered his guilty plea and thus rendered the agreement difficult, if not impossible, to unwind,” Acosta wrote.

The Herald’s investigation found that “Acosta not only buckled under pressure from Epstein’s lawyers, but he and other prosecutors worked with them to contain the case, even as the FBI was uncovering evidence of victims and witnesses in other states,” citing FBI and court documents.