Donald Trump’s labour secretary Alex Acosta has resigned over his role in a controversial plea deal handed to convicted sex offender Jeffrey Epstein a decade ago – an apparent attempt to draw a line under an episode that had become an increasing distraction for the administration.

Speaking to reporters outside the White House, the president said Mr Acosta had called him and offered to resign, saying the controversy had taken attention away from his work.

“He made a deal [with Epstein] that people are happy with, and then 12 years later, they are not happy with it. You’ll have to figure all of that out,” said Mr Trump. “But the fact is he has been a fantastic secretary of labour ... this is him not me, because I am with him.”

He added: “There is no need. I watched him yesterday.”

Mr Acosta has maintained when he helped prosecute financier Epstein for sex crimes in 2008 he sought the best prosecution deal he could, but acknowledged the terms of the deal now looked lenient.

Jeffrey Epstein: Controversies surrounding paedophile billionaire Show all 9 1 /9 Jeffrey Epstein: Controversies surrounding paedophile billionaire Jeffrey Epstein: Controversies surrounding paedophile billionaire Jeffrey Epstein in court Billionaire financier Jeffrey Epstein attends court as he pleads guilty to solicitation and procuring a person under the age of 18 for prostitution, 2008 Zuma/Rex Jeffrey Epstein: Controversies surrounding paedophile billionaire Jeffrey Epstein in court Billionaire financier Jeffrey Epstein pleaded guilty in 2008 to felony solicitation and procuring a person under the age of 18 for prostitution. He was sentenced to 18 months in jail. Epstein, allegedly paid several girls under the age of 18 in return for naked massages at his Palm Beach, Florida estate Zuma/Rex Jeffrey Epstein: Controversies surrounding paedophile billionaire Jeffrey Epstein's car Jeffrey Epstein is whisked away from the Palm Beach County jail in a black car shortly after 6am on 22 July 2009. Epstein left the jail through the sally port, where prisoners are brought in, rather than through the main doors where prisoners are routinely released Zuma/Rex Jeffrey Epstein: Controversies surrounding paedophile billionaire Jeffrey Epstein's mugshot Billionaire Jeffrey Epstein's mugshot, taken after he was indicted for soliciting a prostitute on 26 July 2006. Beginning in mid-March 2005, Epstein became the target of a sexual battery probe conducted by the Palm Beach Police Department, according to the affidavit, which alleges that Epstein paid a series of underage girls to engage in sexual activity with him. In a 2002 New York magazine profile of Epstein, Donald Trump called the moneyman a 'terrific guy' who 'likes beautiful women as much as I do, and many of them are on the younger side.' Epstein, who reportedly runs a multibillion-dollar investment fund, travels in his own Boeing 727 (upon which he has transported Bill Clinton to Africa) and owns a 45,000-square-foot mansion on Manhattan's Upper East Side Palm Beach County Sheriff's Department Jeffrey Epstein: Controversies surrounding paedophile billionaire Jack Goldberger, Jeffrey Epstein's attorney Jeffrey Epstein's attorney, Jack Goldberger, talks with reporters gathered outside the Palm Beach County jail on 22 July 2009 after Epstein was whisked away from the jail in a black car Zuma/Rex Jeffrey Epstein: Controversies surrounding paedophile billionaire Jeffrey Epstein Florida Police department sexual offenders database picture of Jeffrey Epstein taken in 2013 Jeffrey Epstein: Controversies surrounding paedophile billionaire Jeffrey Epstein's mansion His Palm Beach mansion in Florida Google Jeffrey Epstein: Controversies surrounding paedophile billionaire Jeffrey Epstein's island The private Caribbean island, Little St James is part of the US Virgin Islands NBC News Jeffrey Epstein: Controversies surrounding paedophile billionaire Jeffrey Epstein's island The private Caribbean island, Little St James is part of the US Virgin Islands NBC News

This week at a televised news conference, Mr Acosta defended his work as a federal prosecutor for the southern district of Florida.

His role in the case had come under fresh scrutiny after Epstein, 66, was this week arrested and charged with sex trafficking underage girls as young as 14 years old in both Florida and New York.

“In our heart we were trying to do the right thing for these victims,” he said. “We believe that we proceeded appropriately.”

While Mr Trump may have claimed Mr Acosta had offered to resign, reports suggested many in the White House believed he needed to go, and that the president had been among those who carefully watched his televised press conference on Thursday.

Plenty of Democrats had also been calling for the resignation of Mr Acosta, whose deal with Epstein saw him plead guilty to a single charge of sex with a minor, serve 13 months in jail and register as a sex offender. Many believed this was insufficient given he was being probed over allegations involving at least 40 teenage girls.

Trump's labour secretary says 'no regrets' over handing of Jeffrey Epstein case as new alleged child victim comes forward

Earlier this week, prosecutors brought the 66-year-old to court in New York City and charged him with two counts of sex trafficking, and said he had preyed on dozens of girls in New York and Florida.

Mr Acosta, who appeared alongside Mr Trump on Friday morning, said his resignation would be effective in seven days. He said he did not think it was right for his handling of Epstein’s case to distract from the president’s agenda and his work as secretary of labour.

“My point here today is we have an amazing economy, and the focus needs to be on the economy,” said Mr Acosta said.

A federal judge said Mr Acosta violated federal law by not notifying Epstein’s victims of the arrangement. The justice department has been investigating.

A Florida lawyer who represents several Epstein victims welcomed Acosta’s resignation.

“Mr Acosta broke the law when he was a US attorney by failing to keep the victims informed about the negotiations taking place in 2008,” said attorney Spencer Kuvin.

“We should never allow an official who has been held to break the law by a federal court, to hold an office in the president’s cabinet. His resignation today is hopefully only the first step in holding those accountable.”

Mr Trump, who had once been an associate of Epstein who frequented his Mar a Lago club, initially defended Mr Acosta but said he’d look “very closely” at his handling of the 2008 agreement.

The deal had come under scrutiny earlier this year following reporting by the Miami Herald.