The final indignity for the now-ex White House press secretary apparently came when President Donald Trump appointed a personal friend, Anthony Scaramucci, as the new White House communications director over Spicer's vehement opposition.

Spicer's decision brings to an end a disastrous stint as the lead spokesperson for the Trump administration -- an unending nightmare of clashes both with his colleagues and the reporters who cover the White House, subtle and not-so-subtle slams from the President himself and a star turn as a favorite punching bag of "Saturday Night Live."

While his public role had diminished significantly in recent weeks -- Spicer's press briefings increasingly became less frequent over the past couple months -- his allies insisted he remained an integral player in the White House communications efforts, even taking over some of the responsibilities of communications director Mike Dubke, who resigned in May

While Trump's decision to appoint Scaramucci to that job was the final straw for Spicer, it had been clear almost since he was first appointed to the press secretary post that it was a poor fit.

In the wake of the appointment -- which took many people in Washington by surprise -- even Spicer's allies wondered whether he was a good choice. Spicer, a longtime fixture in Washington political circles, had gained a reputation as a bulldog: tough, loyal and willing to bite whomever he was ordered.

But, the job of White House press secretary is a deeply complex job -- requiring the person who holds it to balance the competing interests of his bosses up to and including the president of the United States and the press corps to whom he also kind of, sort of reports.

There were doubts Spicer could handle that dual role with the nuance and subtlety it takes to do the job well. (In Spicer's defense: Being the White House press secretary under Trump may well be an impossible job given Trump's obsession with the media and how he is perceived.)

Those predictions of Spicer's struggles came true from the second he stepped behind the podium -- when he lectured reporters on Janurary 21 about what they "should be writing and covering." (This came two days before Spicer's first official White House briefing.)

At issue was the coverage of the size of the President's inauguration crowds. "This was the largest audience to ever witness an inauguration, period," Spicer insisted to the assembled press corps, despite photographic evidence that suggested the crowd at President Barack Obama's first inauguration was considerably larger.

That first interaction between Spicer and the press was instructive -- and a telling indicator of all that would come after it.

Rather than balance the concerns of the President with the concerns of the media, Spicer made clear from the jump that he would be doing the President's bidding at all times. He would treat the media tasked with covering the White House with the same disdain that the President had perfected on the campaign trail.

That first briefing also revealed Spicer's willingness to veer from established facts in order to make the boss happy. Trump wanted him to go out and tell reporters it was the largest inauguration crowd ever. So, that's what Spicer did -- facts be damned.

Time and time again over the next six months, Spicer willingly ignored facts to make the President's case. Whether it was about the alleged millions of people who had illegally cast votes in the 2016 election (not true!) or the idea that Donald Trump Jr.'s meeting with a Russian lawyer was solely about adoption policy, Spicer was more than willing to say what pleased the President at the expense of the truth.

It was that insistence on a set of what was dubbed " alternative facts " -- to which no one outside of the White House ascribed -- that led to Melissa McCarthy's devastating portrayal of Spicer on "Saturday Night Live." McCarthy's Spicer was an all-offense-all-the-time guy who treated reporters like children or hired help. But, McCarthy also cast Spicer as a figure of real pathos -- someone desperate to please Trump but who met with nothing but opprobrium from the boss.

Spicer's emergence as a satirical figure of ridicule, coupled with repeated reports of Trump's unhappiness with his performance at the podium, changed him in his final months on the job. He went from bellicose to almost bashful. He was withdrawn and guarded in the press briefings he did conduct. It seemed as though he viewed the entire process as akin to getting a root canal with no laughing gas.

The briefings, too, began to shrink -- in length and importance. Spicer was initially shelved for deputy press secretary Sarah Huckabee Sanders. Then the briefings started to be off-camera affairs only. Even in those off-camera briefings, Spicer seemed unwilling to engage with reporters -- speaking in a monotone and referring almost every question to some other part of the federal bureaucracy.

Within the last month, Spicer had become almost invisible at the White House -- a remarkable transition given that, aside from Trump, he was the single most recognizable administration figure for much of these first six months. (It didn't hurt that "Saturday Night Live" went off the air for the summer on May 20; the show will run 30-minute episodes in primetime starting August 10 .)

His departure then feels almost expected. For months, Republicans outside of the White House wondered aloud how he could keep going to work every day given the circumstances. On Friday, Spicer decided to walk away.

What is he walking away from? A press shop -- and a broader White House staff -- that is turning more and more into a "friends and family" operation. Outsiders to the Trump inner circle, like Spicer, are being purged in favor of the likes of Scaramucci, an old business pal of the President. That is a clear strategy order from the top; Trump reportedly overruled Spicer as well as chief of staff Reince Priebus and chief strategist Steve Bannon in bringing in Scaramucci.

For Spicer, the decision may well come as a relief. He had tried and failed to make Trump happy and, in so doing, had badly alienated the very press corps he was supposed to service.

It remains to be seen whether Spicer sustains any lasting damage from his time in the White House. What's clear is that he was a terrible fit for the job from the get-go -- and that this end for him was utterly predictable.