White House Press Secretary Sean Spicer abruptly resigned Friday morning after President Donald Trump named former New York hedge fund executive Anthony Scaramucci as his communications director.

Spicer, who had stepped back from most day-to-day press briefings in expectation of taking on a larger role in overseeing the communications shop, viewed his role diminished by Scaramucci’s hire and resigned. Scaramucci’s appointment was opposed by Chief of Staff Reince Priebus, chief strategist Steve Bannon, and others in Trump’s inner circle, but Trump was adamant about bringing Scaramucci, the founder of SkyBridge Capital, into the West Wing.

Scaramucci, a vocal supporter of Trump’s and frequent defender on cable news and Twitter, had been eyed for several West Wing and administration positions. Political infighting and time-consuming ethics reviews of his financial holdings meant he was unable to fill a role in the White House Office of Public Liaison. But he has lobbied Trump and others for another West Wing role for months.

Sarah Huckabee Sanders, who was named new Press Secretary, delivered a statement from Trump on Spicer’s resignation. “I am grateful for Sean’s work on behalf of my administration and the American people,” Trump’s statement read. “I wish him continued success as he moves on to pursue new opportunities. just look at his great television ratings.”

The announcement was delivered by Priebus to White House communications staffers just before noon Friday in an all-hands meeting in Spicer’s office. The communications director position had been vacant for nearly two months after the May departure of Mike Dubke.

For the last month, Sacaramucci served as senior vice president and chief strategy officer at the U.S. Export-Import Bank.

Spicer said Friday afternoon that he will “continue my service through August.”

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.