WASHINGTON - Labor Secretary Alex Acosta resigned Friday, July 12, amid intense scrutiny of his role as a U.S. attorney a decade ago in a deal with Jeffrey Epstein that allowed the financier to plead guilty to lesser offenses in a sex-trafficking investigation.

President Donald Trump told reporters Friday morning that Acosta was stepping aside and it was Acosta's decision.

As recently as Tuesday, Trump had defended his embattled Cabinet secretary, telling reporters he felt "very badly" for Acosta and praising his tenure at the Labor Department.

The 2008 plea deal in Florida came under renewed scrutiny in light of Epstein's indictment Monday on more child sex trafficking charges in New York. Acosta faced pressure to step down from top Democrats, including numerous presidential candidates who criticized the deal as excessively lenient and said Acosta had been irreparably damaged by it.

As of Tuesday, congressional Republicans continued to stand by Acosta, saying issues about the plea deal were vetted at his confirmation hearing in 2017.

RELATED:

Epstein, 66, signed a non-prosecution agreement with federal authorities and pleaded guilty in state court in 2008 to felony solicitation of underage girls.

During his 13-month sentence in a Palm Beach, Florida, jail, Epstein was allowed to work out of his office six days a week. As U.S. attorney, Acosta approved the deal. A federal judge this year ruled that prosecutors violated the rights of victims by failing to notify them of an agreement not to bring federal charges.

At a news conference Wednesday, Acosta defended his role as a federal prosecutor in brokering the decade-old plea deal for Epstein, but lawyers for alleged victims criticized his explanation and Democrats called for him to appear at a congressional hearing in two weeks.

He said a state attorney was preparing to allow Epstein to plead to a single charge of solicitation that did not make a reference to the age of the female minor. That deal would have carried no jail time and would not have required Epstein to register as a sex offender.

"We wanted to see Epstein go to jail," Acosta said. "He needed to go to jail."

On Tuesday, Acosta mounted a vigorous self-defense on Twitter, writing that the crimes committed by Epstein were "horrific" and that he was pleased that prosecutors in New York were moving forward with a new case.

He suggested that the evidence prosecutors now have - including lewd photographs of underage girls seized in a raid on Epstein's mansion - were not available to his team when he was Miami's U.S. attorney from 2005 to 2009.

This article was written by John Wagner, a reporter for The Washington Post.