Sean Spicer resigned as White House press secretary July 21. He had many memorable moments during his time in the role. Here's a look back at some of the most notable. (Bastien Inzaurralde/The Washington Post)

It was a pair of comedians, not the press, that hung around the neck of White House press secretary Sean Spicer, who unexpectedly announced his resignation Friday.

Melissa McCarthy’s occasional impersonation of “Spicey” on “Saturday Night Live” became an instant classic, helping draw the most viewers the show has had since the Clinton administration.

But it was Stephen Colbert who was slinging jokes and routines aimed at Spicer’s infamously short fuse and bluster on what seemed like nearly every episode of the Late Night Show on CBS.

President Donald Trump tweeted Friday a mix of his well-wishes for Spicer and a prod at the media.

Sean Spicer is a wonderful person who took tremendous abuse from the Fake News Media – but his future is bright! — Donald J. Trump (@realDonaldTrump) July 22, 2017

Spicer’s tenure as press secretary was historically short — a unique case considering it did not end because of a Watergate scandal, the end of a presidential term or an assassination attempt, which prematurely ended the careers of some of his predecessors. If Spicer was a late-night comedy junkie, Colbert’s jokes might have made it feel like the career of Stephen T. Early — who served as President Franklin Roosevelt’s press secretary for a record 4,403 days.

For his part, Spicer has been an occasional good sport. On Friday he told Fox News host Sean Hannity about his SNL portrayal: “I think that there were parts of it that were funny, but there’s a lot of it that was over the line. It wasn’t funny. It was stupid, or silly, or malicious.”

Here are some of the most defining moments that Spicer came under Colbert’s fire during the past six months as President Trump’s press secretary.

[Is Trump good for comedy? Comedians respond.]

January

Spicer’s first full day as press secretary set a contentious tone with the press that came to define both his professional identity and the White House’s playbook dealing with criticism: decry reporting with accusations of “fake news.”

“This was the largest audience to ever witness an inauguration — period — both in person and around the globe,” Spicer said while lecturing the press over the correct reporting that Barack Obama drew a bigger crowd at his 2008 inauguration.

Colbert saw an opening.

“Yes, he is clearly already getting Americans back to work,” Colbert said while referencing Spicer’s comparison shots of the Mall in Washington during Trump’s inaugural and Obama’s address. “All I can figure is that nobody could get the day off — they’re all working. Either that’s a lot of empty space or that crowd is even whiter than I thought.”

February

In February, Spicer opened questions to media outlets without Washington representation by Skype video calls in a bid to give smaller news outlets an opportunity to ask questions. The first round of queries carried a more Trump-friendly and cordial tone compared with most other agencies.

One question, from Portland, Ore., conservative radio host Lars Larson, opened with a remark on gratitude for Spicer’s Navy service and the opportunity to ask a question.

Colbert tore into the exchange later on his show.

“I have a broad question too: How are we seeing you when your head is so far up Sean Spicer’s ass?”

Then there was the time Spicer mentioned a terrorist attack on Atlanta that was actually the Orlando nightclub shooting. In an email afterward, Spicer said he “clearly” meant Orlando.

“That’s why you always hear Civil War buffs talking about General Sherman’s burning of Epcot,” Colbert shot back.

March

Heath-care reform was an opportunity for the White House to shake loose the widening Russian collusion narrative and go on the offensive by checking off Trump’s legislative priorities. But fierce public debates with legislators in their home districts and the tepid defense of some Republican lawmakers stalled Trump’s promise to repeal and replace Obamacare.

Sean Spicer learned quickly that visual aides can quickly backfire. In an attempt to explain how lawmakers streamlined a bill of one of the most complicated issues in United States politics, Spicer pointed to the Affordable Care Act and said “This is government,” while gesturing to the American Health Care Act, saying, “This is not.”

“When it comes to writing anything down, shorter is always better. That’s why Moby Dick is much worse than the instructions that come with your rice cooker,” Colbert said on his show later that night. “Why not a one-page plan that says ‘walk it off’?”

[Stephen Colbert mocks Trump, announces a week of ‘Late Show’ episodes from Russia]

April

Spicer was looking for a good news moment. He announced in April that Trump would donate his earned salary — $78,333 — to the National Park Service, which would have suffered part of the Interior Department’s 2 percent ($1.5 billion) budget decrease that Trump himself proposed earlier in the year, Colbert said.

He also noted Spicer’s height compared to two taller men.

“This job is really grinding him down, from the shins up,” Colbert said.

Spicer handed a check signed by Trump to Tyrone Brandyburg, the superintendent of Harpers Ferry National Historical Park, who did not smile for a photo.

“That is the official face of meeting Sean Spicer,” Colbert said.

May

One of Trump’s most consequential decisions in his young presidency is the firing of FBI Director James B. Comey. The media scrambled to cover the event, with Fox Business landing a brief evening interview on the White House grounds.

Then something strange happened.

Spicer appeared to dodge reporters among bushes on the lawn. The Washington Post issued that corrected language, previously reporting Spidey hid “in” the bushes.

Colbert took the opportunity not to question the dignity of Spicer but to instruct on the subtle differences in prepositional phrases.

June

Colbert ramped up his takedowns of Spicer by June 21, devoting a five-minute segment to the building rumors Spicer would be out of a job soon. Colbert pivoted from a discussion on rising global temperatures by asking: “You know who’s feeling the heat? Sean Spicer.”

The pressure on Spicer came following the announcement that press briefings were to be held off-camera and without audio. When asked why the decision was made, Spicer said: “There are days where we decide that the president’s voice should be the one who speaks for the administration.”

“Your whole job is speaking for the administration,” Colbert said, pretending to grieve for a hypothetical that we now know is a reality — Spicer’s ousting.

“Sean, I have so many questions. If you go, who will not answer them?” Colbert pleaded.

July

The speculation of Spicer’s departure from the podium continued to rage this month, and Colbert imagined what could happen now that Kermit the Frog needs a new voice.

Colbert did not give Spicer a reprieve Friday, tearing into the now-former press secretary from his personal and show accounts less than an hour after Spicer’s resignation went public.

Words fail me. And they failed him, too. https://t.co/eSEG3emuLj — Stephen Colbert (@StephenAtHome) July 21, 2017

We can't wait to read his obscure-all book.#SeanSpicer — The Late Show (@colbertlateshow) July 21, 2017

The fact is, Sean Spicer had the largest group ever to attend a going away party. Period. — Stephen Colbert (@StephenAtHome) July 21, 2017

Spicer’s timing may have helped. Colbert’s show tapes in the afternoon, leaving Colbert precious little time to coordinate a farewell.

But there is always Monday.

Read more:

CBS basks in Colbert’s recent ‘Late Show’ success: ‘Stephen is killing it’

Three takeaways from Stephen Colbert’s much-hyped ‘Russia Week’