The Scaramucci revolution was televised.

After months of chatter that his job was on the chopping block, White House Press Secretary Sean Spicer finally exited stage right on Friday after financier, donor and TV talking head Anthony Scaramucci was given the job of White House communications director, which had been vacant since the departure of Mike Dubke in May. Spicer resigned in opposition to the move.

The incident brought simmering conflicts inside the White House to a boil and pitted top advisers against each other in a last-minute effort on the part of some of them to stymie the appointment of Scaramucci, known as “The Mooch,” who had refashioned himself as an ardent Trump supporter during the campaign and had been left in limbo during the early days of the administration after not getting a promised job.

According to three sources close to the White House and a White House official, discussions about appointing Scaramucci as communications director began weeks ago. The idea, sources say, was initially Trump’s; Scaramucci has been a close ally, and Trump appreciated Scaramucci’s defense of him on television. Jared Kushner and Ivanka Trump were involved in the decision and supported Scaramucci coming in, sources say, while White House chief of staff Reince Priebus and chief strategist Steve Bannon were firmly against, with Priebus calling Scaramucci on Thursday night and texting people close to him in a last-ditch effort to reach him and stop the hire. Bannon, a source close to the White House said, wanted an experienced communications professional in the job as the White House struggles to form a coherent message strategy to deal with the Russia investigation and the litany of other crises in which the administration is mired.

Another source close to the White House said that while Bannon strongly opposed the move initially, he gave in once the decision had been made. A White House official told me they had seen Scaramucci enter Bannon’s office for a meeting three weeks ago, though a source close to the White House familiar with the meeting insisted that Bannon and Scaramucci had talked about politics and policy over lunch but not specifically the communications director job.

“It’s wake-up time for people,” said a source close to the White House. “Get your job done. Get ahold of the Russia narrative. They probably want to get a little more aggressive in getting control of these things.”

Spicer’s stature had faded in recent weeks. The White House began holding fewer and fewer on-camera press briefings, and Spicer gave fewer and fewer of them, with deputy press secretary Sarah Huckabee Sanders increasingly becoming the face of the communications shop. Spicer appears to have been looking for a way out. According to a source with direct knowledge, Spicer was making calls about jobs outside the White House in late May. Spicer did not immediately return requests for comment.

On Friday, Scaramucci made his debut appearance in the White House briefing room. It was the first on-camera briefing in weeks. Tanned and coiffed, he wore a sharp blue suit and took questions for about half an hour.

Scaramucci bid goodbye to Spicer, saying “I love the guy and I wish him well, and I hope he goes on to make a tremendous amount of money.”

He said he had “enormous respect” for Bannon. “He has a strong personality, I have a strong personality,” he said, alluding to Bannon’s opposition to his hire.

And he called Priebus a “dear friend,” saying “We are a little bit like brothers, where we rough each other up a little, which is totally normal for brothers. There's a lot of people here who have brothers, so you get that."

That’s not the full picture, as the two men are known to feel animosity towards each other. A source close to the White House said that Scaramucci especially resents Priebus for waiting until he was about to be sworn in as the White House’s liaison to the business community in the early days of the administration before informing him he wasn’t getting the job. According to one of the sources close to the White House, Scaramucci and allies use the nickname "Prancer" or just a deer emoji to refer to Priebus, a reference to a a photo of him in a Christmas reindeer sweater that was circulated.

Priebus did not depart the White House alongside Spicer, and publicly supported Scaramucci. “I support Anthony 100%. We go back a long long way and are very good friends. All good here,” he told The Weekly Standard’s Michael Warren.

Among the ever-shifting crew of “embattled” White House staffers, Priebus is frequently mentioned as a candidate for eventual defenestration. One Politico story from June said that he would be fired if he could not fix the White House by July 4 weekend; he survived.

But this time could, sources close to the White House say, be different. Scaramucci sent a message to Priebus from the podium, saying that he reports directly to the president — meaning not to Priebus. Scaramucci said he would keep Hope Hicks and Dan Scavino but didn’t commit to keeping the rest of the communications shop, which were drawn primarily from the Republican National Committee alongside Spicer and Priebus. “I gotta get to know people,” he said.

Another potentially worrying sign for Priebus is that Blackstone executive Wayne Berman, who has been floated more than once as a potential chief of staff, visited the White House this week. Berman had lunch with Spicer on Tuesday and visited Bannon that same day along with an outside Blackstone adviser, according to a source close to the White House with knowledge of the meetings.

Spicer and Priebus are experienced Washington hands who have never really fit in the freewheeling, chaotic culture of the Trump White House. Spicer’s first act as press secretary, in which he was ordered into the briefing room to lie about the size of Trump’s inauguration crowd size, is the indelible image of his time in the job for a reason. He was a denizen of the swamp, bent to Trump’s will; a mid-range communications guy, suddenly thrust into the melodramatic alternate universe of Trump.

On Friday night, Spicer will appear on Sean Hannity’s Fox News show as well as Priebus; Scaramucci was initially scheduled to appear too, but no longer  is as of Friday afternoon. A source close to Hannity said that there had been a scheduling conflict and that Scaramucci will be on the show next week.