The US Labour Secretary Alexander Acosta has quit amid criticism of his handling of a plea deal with billionaire Jeffrey Epstein, who is accused of sexually abusing dozens of underage girls.
US President Donald Trump, who announced the news at the White House, said Mr Acosta had been "great" in the role and that he had not asked for the resignation.
"I hate to see this happen," Mr Trump added.
Mr Acosta, who had served in Mr Trump's cabinet since April 2017, was the US attorney in Miami when he oversaw a 2008 non-prosecution agreement with Epstein.
The wealthy financier avoided federal charges and served 13 months in jail.
Similar charges recently filed against Epstein by federal prosecutors in New York had put Mr Acosta's role in the 2008 deal under renewed scrutiny.
Mr Acosta said his resignation would be effective in seven days and he did not think it was right for his handling of Epstein's case to distract from 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 job creation," he said.
Top Democratic politicians and presidential candidates had demanded that Mr Acosta resign over his handling of the agreement, which a judge said violated federal law because he did not notify Epstein's victims of the arrangement.
The US Justice Department has been investigating.
Sex abuse investigation
Mr Trump had initially defended Mr Acosta, but said he would look "very closely" his handling of the 2008 agreement.
Epstein (66) reached the deal to secretly end a federal sex abuse investigation involving at least 40 teenage girls that could have landed him behind bars for life.
He instead pleaded guilty to state charges, spent 13 months in jail, paid settlements to victims and is a registered sex offender.
Mr Acosta had attempted to clear his name, and held a news conference - encouraged by Mr Trump - to defend his actions.
In a 50-plus-minute rebuttal, Mr Acosta argued his office had secured the best deal it could at the time and was working in the victims' best interests.
"We did what we did because we wanted to see Epstein go to jail," he said, refusing to apologise for his actions.
"We believe that we proceeded appropriately."
Pressed on whether he had any regrets, Mr 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."
Epstein was arrested last weekend in New York on charges relating to claims dating back to the 2000s.
He has pleaded not guilty to one count of sex trafficking and another of sex trafficking conspiracy.