Labor Secretary Alexander Acosta has resigned, President Trump told reporters alongside Acosta on Friday morning.

Trump told reporters that Acosta called him Friday morning and the move was Acosta’s decision. Acosta told reporters he thought it would be “selfish” for him to remain as a secretary and criticized the media for its coverage of the Labor Department in recent days.

“As I look forward, I do not think it is right and fair for this administration’s Labor Department to have Epstein as the focus, rather than the incredible economy that we have today,” Acosta said. “It would be selfish for me to stay in this position and continue talking about a case that 12 years old.”

Acosta’s resignation will be effective next Friday. Deputy Secretary of Labor Patrick Pizzella will serve as acting secretary, Trump said.

“(Acosta is) a great labor secretary, not a good one,” Trump told reporters, adding that Acosta did a “very good job.”

The exit follows fallout this week over Acosta’s role in reaching a lenient plea deal for accused sex trafficker and financier Jeffrey Epstein in 2008.

On Wednesday, Acosta gave a lengthy press conference to address his role in the plea deal for Epstein more than a decade ago when Epstein faced charges for sex abuse crimes. Acosta was the prosecutor on the case and helped arrange a meager 13-month prison sentence for the billionaire that involved work release.

At the time, Acosta said his relationship with Trump was “outstanding” and he intended to remain serving at the “pleasure of the President.”

Earlier this week, White House officials told Politico that Acosta’s future within the administration was heavily dependent on how long he remained in the news cycle.

The 2008 deal received heightened attention this week because Epstein was arrested on Monday in New York and charged with running a sex trafficking ring with underage girls in the early 2000s.