During his nine-year stint on CBS’s The Late Late Show, comedian Craig Ferguson, like most late-night talk show hosts, frequently poked fun at tabloid celebrities during his opening monologues. But there was one time when he decided he didn’t want to cross that line, so he took a stand, and he took a risk — even though he knew he might lose his job. “I was convinced at the time that I was going to get fired for it. I thought it was my ‘Jerry Maguire moment,’” he confesses now.

It was Feb. 19, 2007, the Monday of Presidents’ Day weekend. Three days earlier, troubled pop star Britney Spears (who earlier that month had entered Eric Clapton’s Crossroads Centre rehab facility in Antigua, only to check herself out after just one day) had made explosive national news by shaving her head at a hair salon in Tarzana, Calif. It was an especially cruel media era — TMZ had launched two years prior, and nasty gossip bloggers like Perez Hilton were racking up millions of pageviews reporting on Spears’s doomed K.Fed marriage, various supposed fashion/parenting/hygiene fails, and increasingly erratic behavior. And the media was especially unempathetic to Spears that weekend. But Ferguson refused to pile on.

Speaking to Yahoo Entertainment/SiriusXM Volume while promoting his new docuseries, Hobo Fabulous, Ferguson recalls, “I went in to work Monday morning, and everybody had the [Britney] jokes written up. And I was like, ‘No. I'm not doing it.’ And I didn't. I was genuinely upset, and I went with my gut. … It just struck me as the right thing to do in the moment.”

Ferguson insists that he “didn't have an agenda” and “wasn't setting forth a manifesto” that night. But he explains that, as a recovering alcoholic who’d experienced his own lost weekends and rock-bottom moments, the news of Spears’s meltdown hit close to home for him. “When I saw what happened to her that weekend, that happened to coincide with my own 15 years sobriety [anniversary] — that same weekend,” he says. “And I thought, ‘I don't know what I want to do on the show, but I'm f***ing sure I don't want to do this.’”

Instead, Ferguson went onstage and — amid the audience’s nervous and sometimes downright inappropriate laughter — he spoke from the heart. “Tonight, no Britney Spears jokes,” he announced. And for the next 12 minutes, he instead shared stories of his own addiction and recovery while also expressing concern for Spears, who was 25 years old at the time.

“The thing is, you can embarrass somebody to death,” he explained that night, addressing the dangers of the media’s tendency to ridicule unstable, at-risk celebrities. “I'm starting to feel uncomfortable about making fun of these people. Funny comedy should have a certain amount of joy in it. It should be about us attacking the powerful people, attacking the politicians and the Trumps and the blowhards. …We shouldn't be attacking the vulnerable people. … What [Spears is] going through reminds me of what I was doing. It's an anniversary; you start to think about it. It reminds me of where I was 15 years ago, when I was living like that. Now, I'm not saying Britney Spears as an alcoholic; I don't know if she's an alcoholic or not. But she clearly needs help.”

Spears thankfully rebounded from her difficult 2007, although she still struggles with being in the public eye and just last week posted a plea on Instagram for online trolls to stop saying “the meanest things.” As for Ferguson, he obviously did not get fired for his candor, and he went on to host The Late Late Show for another seven years. And while he says he “never heard directly from Miss Spears” after his speech, he stresses, “That was not necessary. I wasn't looking for that.” However, he does have a feeling that she heard what he said, and that she may have thanked him in her own subtle way.

“I did want to use one of her songs [“Oops!...I Did It Again”] in a standup special, and when I requested it, everyone was saying there's no way that song was going to clear,” he says with a chuckle. “I asked if I could use it in a standup special, and I got it for nothing. That's a very expensive song to use. So I'm extremely grateful that she let me do that.”

The above interview is taken from Craig Ferguson’s appearance on the SiriusXM show “Volume West.” Audio of this conversation is available on demand via the SiriusXM app.

Read more from Yahoo Entertainment:

Follow Lyndsey on Facebook, Twitter, Instagram, Amazon, Spotify.

Want daily pop culture news delivered to your inbox? Sign up here for Yahoo Entertainment & Lifestyle’s newsletter.