Updated

Labor Secretary Alex Acosta has been under fire in recent days for his involvement in a secret 2008 plea deal for wealthy financier Jeffrey Epstein, who was recently hit with new charges for alleged sex trafficking crimes. Acosta said he would resign from the Cabinet position he held since 2017 just days after Epstein's indictment.

A handful of top lawmakers, including House Speaker Nancy Pelosi, had demanded Acosta to resign before he officially made the announcement on July 12.

".@SecretaryAcosta must step down. As US Attorney, he engaged in an unconscionable agreement w/ Jeffrey Epstein kept secret from courageous, young victims preventing them from seeking justice. This was known by @POTUS when he appointed him to the cabinet. #AcostaResign," Pelosi previously tweeted.

JEFFREY EPSTEIN'S PRIVATE 'ISLAND OF SIN' AND SEX DOLLS: 5 WEIRD DETAILS TO KNOW

President Trump called Acosta a "great" labor secretary and claimed he didn't influence the 50-year-old's decision in any way.

"I hate to see this happen," said Trump, who said days prior the White House would review Acosta's handling of the 2008 decision “very closely.”

Though he continued to defend his handling of Epstein's 2008 case, Acosta said he didn't want the past to distract from his work as labor secretary.

LABOR SECRETARY ACOSTA DEFENDS ROLE IN EPSTEIN PLEA DEAL, FAULTS STATE PROSECUTORS

"We have an amazing economy and the focus needs to be on the economy job creation," said Acosta on July 12 as he stood alongside Trump at the White House.

Acosta is joining a growing list of notable officials who have departed the Trump administration over the years. As news of his resignation dominates headlines, here's a look at how he's connected to the Epstein scandal.

What's Acosta's connection to Epstein's 2008 plea deal?

In 2008, Epstein was facing a federal sex abuse investigation (a 53-page federal indictment) involving at least 40 teenage girls that could have landed him behind bars for life.

At the time, Acosta — then serving as U.S. attorney in Miami — helped Epstein secure an 18-month plea deal. Epstein avoided federal charges by pleading guilty to state charges and served 13 months in jail, paid settlements to victims and registered as a sex offender.

The deal, which many called "lenient," first came under scrutiny after the Miami Herald published a lengthy feature piece about what it dubbed the "deal of a lifetime" in November 2018.

According to the Miami Herald, Acosta agreed the non-prosecution deal would be kept sealed, meaning the alleged victims wouldn't know the details of the agreement.

Acosta recently said taking Epstein's 2008 case to trail back then would have been a "roll of the dice" scenario, per the Miami Herald.

How has Acosta responded to criticism over the 2008 agreement?

Acosta had attempted to clear his name and even held a news conference in early July to defend his actions.

“Simply put, the Palm Beach state attorney’s office was ready to let Epstein walk free, no jail time,” he said, insisting he wanted to see Epstein serve time in prison. “Prosecutors in my former office found this to be completely unacceptable.”

Pressed on whether he had any regrets, Acosta repeatedly suggested that circumstances had changed since then.

"We now have 12 years of knowledge and hindsight and we live in a very different world," he said. "Today's world treats victims very, very differently," he said.

However, Barry Krischer — the Palm Beach County state attorney at the time — claimed Acosta's recollection was "completely wrong."

“If Mr. Acosta was truly concerned with the State’s case and felt he had to rescue the matter, he would have moved forward with the 53-page indictment that his own office drafted," Krische said.

After federal attorneys in New York announced the new charges against Epstein, Acosta tweeted that he was "pleased" by their decision.

"The crimes committed by Epstein are horrific," Acosta tweeted. "With the evidence available more than a decade ago, federal prosecutors insisted that Epstein go to jail, register as a sex offender and put the world on notice that he was a sexual predator."

"Now that new evidence and additional testimony is available, the NY prosecution offers an important opportunity to more fully bring him to justice," he said.

Fox News' Adam Shaw and The Associated Press contributed to this report.