When Saturday Night Live aired its 40th anniversary episode in February, many hoped it might be the perfect occasion for Eddie Murphy to return to stand-up comedy. They were off about the timing—but only by a little. The moment fans had been waiting 28 years for finally came when Murphy did five minutes of material while accepting the Mark Twain Prize for American Humor at the Kennedy Center on Sunday night. His target: Bill Cosby. Though that might be the comedic equivalent of low-hanging fruit these days, Murphy’s jokes marked a deliberate shift in his own thinking on the subject in recent months.

Murphy’s impression of Cosby is already legend. It memorably leads off his film Raw, where he recalls Cosby chastising him for using too much bad language in his previous stand-up set, Delirious. Murphy was asked to reprise his act for SNL 40, in a sketch that mocked Cosby’s shattered public image. But he turned down the opportunity, only giving a brief “thank you” speech on the show and telling no other jokes. (Kenan Thompson did the sketch.) “There’s nothing funny about it,” he told The Washington Post. “If you get up there and you crack jokes about him, you’re just hurting people. You’re hurting him. You’re hurting his accusers.” So what changed?

At the Twain Prize ceremony, which will air on PBS on November 23, Murphy noted that Cosby had won the prestigious comedy award in 2009, and hadn’t yet been asked to give his trophy back. He then launched into an impression of a foul-mouthed Cosby refuting such a demand, further jabbing at the contrast between his clean image and the horrifying accusations of sexual assault that more than 50 women have made against him. Ironically, Cosby twice turned down the Twain Prize before accepting it, because he was unhappy at the “profanities used” in the 1998 ceremony celebrating the inaugural winner Richard Pryor.

Murphy has long seemed to understand Cosby’s hypocrisy, at least since the release of Raw marked the end of the former’s stand-up work. And he reportedly worked hard on the material he debuted at the Kennedy Center, running through the jokes with Arsenio Hall and Chris Rock in a D.C. hotel room beforehand. “[Eddie] said, ‘Because Cosby gonna get sick of this soon, he’s gonna get sick of people hating, and eventually he’s gonna have to say something,’” Hall told The Washington Post. “And we were like, ‘That is funny, man. Are you willing?’”

So why did it take until now for Murphy to rise to the occasion? The SNL sketch represented a perfect opportunity, but the stage may have been too grand—the viewing audience was huge, and Murphy may not have wanted to make his return performing material he didn’t write (the sketch was Norm Macdonald’s creation). “I was like, ‘Hey, I’m coming back to SNL for the anniversary, I’m not turning my moment on the show into this other thing,’” he told The Washington Post.

So it was a pleasant surprise to see one of the most famous comedians alive returning to the stage on his own terms, and the fact that he used the platform to mock Cosby will likely make even bigger waves. Murphy has become more reclusive in recent years. He’s even stopped appearing in mediocre Hollywood comedies, which were the backbone of his career in the 1990s and 2000s. His Kennedy Center appearance might signal the start of the third act in a storied career, or might just be a fascinating throwback to remind fans of his legacy. Either way, it’s still clear that if Murphy tells jokes, people will listen.