WASHINGTON, D.C. — Sean Spicer has resigned as White House press secretary, ending a turbulent six months as the chief spokesman for President Donald Trump‘s administration.

“It’s been an honor and a privilege to serve @POTUS @realdonaldtrump & this amazing country. I will continue my service through August,” Spicer said on Twitter. The New York Times first reported his departure.

Later, at a White House press briefing, new communications director Anthony Scaramucci announced that press deputy Sarah Huckabee Sanders would be elevated to press secretary.

Spicer will be a guest on Fox News’ “Hannity” on Friday night, the network announced.

Spicer objected to Trump’s appointment of Scaramucci as communications director, a position in which he would have to work closely with the press secretary, according to the Times. Spicer had also been serving as communications director since Mike Dubke resigned from the post in late May.

Popular on Variety

Reporters crowded in the White House briefing room, lined up at the door to the White House press offices and awaiting official word. Sanders was scheduled to deliver an on camera briefing to reporters at 2 p.m. ET.

Spicer had been with the administration from the start, but almost immediately had a contentious relationship with the media. It started the day after the inauguration, when Spicer called reporters to the briefing room to make a statement challenging media accounts of the inaugural crowd size.

“This was the largest audience to witness an inauguration, period, both in person and around the world,” Spicer said at the Jan. 21 briefing, challenging some outlets’ focus on comparison photos of the National Mall crowds at Trump’s inaugural with that of Barack Obama’s.

He quickly became a pop culture figure, as the daily press briefings drew higher-than-normal viewership and were carried live by cable news channels.

Spicer’s interaction with the media were skewered by “Saturday Night Live,” with Melissa McCarthy playing him, and even earning an Emmy nomination. Few other press secretaries have reached that level of fame or, to his detractors, infamy. In one skit, McCarthy took out a super soaker and aimed it at the media gathered in the room, a riff on the real-life acrimony between reporters and the White House press operation.

In an April event at the Newseum, Spicer reflected on what he saw were the problems with the way that the media was covering the new administration. He noted that the there was an “element of being first” to “get into the ether on social media.” He also said that the use of anonymous sources was like “a game of telephone” and said that even posed a “danger to our country.”

But Spicer also has had to manage frequent bombshell stories coming out of the administration, as well as Trump’s critical eye over the way that his press and communications have been handled. He reportedly was even critical of the suit that Spicer wore at his first briefing.

There had been rumors for weeks that Spicer was on his way out, as there were reports that others, like Fox News host Kimberly Guilfoyle, were being considered for the job. When Trump visited Pope Frances at the Vatican, Spicer, who is Catholic, was left out of a group of administration figures who met the pontiff.

More of the daily press briefings have been conducted by Sanders, and more have been done off camera, with the audio embargoed until they were finished. Spicer’s last briefing with reporters was on July 17.

Spicer formerly served as spokesman for the Republican National Committee, and in that post during Trump’s presidential transition period.

Scaramucci, founder of SkyBridge Capital, was a co-host of “Wall Street Week” and contributor on the Fox Business Channel. He was a supporter of Trump’s during the campaign, and was a member of his transition team.

Spicer was viewed as a straight shooter when he was with the RNC, but he almost immediately became a focal point for the chaotic first months of Trump’s administration. He was a consistent defender of Trump’s term, and was prone to attacking the media itself for its focus on the Russia investigation as well as Trump’s tweets. His press conferences were often contentious, as reporters pressed him on some of Trump’s statements and how they squared with past remarks and other evidence.

Spicer’s resignation set off immediate speculation about the White House chief of staff Reince Priebus, viewed as a primary supporter of Spicer’s, who was reportedly unaware that Trump was tapping Scaramucci.

Scaramucci is stepping in to a contentious period at the White House, particularly with the fate of efforts to repeal and replace the Affordable Care Act in doubt.