Labor Secretary Alex Acosta, in a surprise appearance Friday with President Donald J. Trump, said that he would resign.
"I thought the right thing was to step aside," Mr. Acosta told reporters at the White House. "It would be selfish for me to stay in this position."
Mr. Acosta leaves after heightened scrutiny of his handling of sexual misconduct charges against Jeffrey Epstein following the announcement of the financier's indictment on Monday. As the top federal prosecutor in south Florida in 2007 and 2008, Mr. Acosta signed off on a lenient plea deal with Mr. Epstein that allowed him to resolve the earlier charges by serving 13 months in a county jail and registering as a sex offender.
Federal prosecutors in Manhattan said Monday that they were charging Mr. Epstein for crimes he committed outside Florida, and that they aren't bound by Mr. Acosta's plea deal. Mr. Epstein has been charged with trafficking girls as young as 14 for sex in the latest case.
At a news conference on Wednesday, Mr. Acosta said that Mr. Epstein would have escaped jail time altogether had his office not been involved in the earlier case. But he was criticized by some Democrats for not offering an apology to Mr. Epstein's victims, who didn't know about the plea deal while it was being negotiated.
"In so many ways I hate what he's saying now because we're going to miss him," Mr. Trump said. He said he had told Mr. Acosta he didn't have to resign.
Mr. Trump also further distanced himself from Mr. Epstein, a former associate who has a home in Palm Beach, where the president's Mar-a-Lago resort is located.
Mr. Trump said he had a falling-out with Mr. Epstein but declined to explain the circumstances — "the reason doesn't make any difference," he said — and repeated that he hasn't spoken to Mr. Epstein in 15 years.
The president said he'd thrown Mr. Epstein out of Mar-a-Lago and that he had never visited Mr. Epstein's Little St. James Island in the Caribbean, a place that locals call "Pedophile Island" and "Orgy Island."
Mr. Trump said Mr. Acosta's deputy, Patrick Pizzella, will become acting secretary of the Labor Department.
Mr. Pizzella is regarded by Democrats and labor unions as more aggressively pro-business than Mr. Acosta. He previously worked with notorious lobbyist Jack Abramoff to try to shield a tiny cluster of Pacific Islands from federal labor and immigration laws.
Mr. Abramoff was the subject of one of the largest congressional lobbying scandals in recent history and was sentenced to federal prison after pleading guilty to fraud, tax evasion and conspiracy to bribe public officials.