Lloyd Bishop/NBCPaul McCartney is a frequent musical performer on Saturday Night Live, so perhaps it was no surprise that he popped up unexpectedly on this weekend's installment of the show, which featured Jimmy Fallon as host and Justin Timberlake as musical guest.

The former Beatle appeared during Fallon's monologue; the host announced that he was planning to sing with three of his biggest musical influences: McCartney, Bob Dylan and David Bowie. Unfortunately, Fallon said, all three of them were stuck in traffic in New York City's Lincoln Tunnel and couldn't make it. Fallon then proceeded to sing "Joy to the World," mimicking both Bowie and Dylan, but when he got to the McCartney part, it was Paul himself who showed up.

When Fallon asked how the rock legend had beaten the traffic, McCartney said, "I took a Citi Bike!" referring to New York City's popular bike sharing program. He then began to sing -- "The Chipmunk Song," of all things -- but then quickly switched to "Have Yourself a Merry Little Christmas," which he sang as a duet with Fallon. At the end, Paul mimed smoking a joint, for some unexplained reason.

Amazingly, McCartney was one of three Rock and Roll Hall of Famers who guest-starred on this weekend's SNL episode: both Madonna and Barry Gibb also showed up for cameos. In Gibb's case, he appeared at the end of the popular Barry Gibb Talk Show sketch that Fallon and Justin Timberlake have been doing for years; he joined in on the show's closing theme, which is set to the tune of the Bee Gees hit "Nights on Broadway."

Madonna played herself as a guest on the talk show, and tried to make a serious point about politics, only to be berated by Fallon, who was portraying Barry Gibb. She also helped introduce Timberlake's performance. The connection? The two scored a hit duet together back in 2008.

All that star power certainly helped SNL in the ratings. The show scored its highest ratings in Nielsen's 56 metered markets and in the advertiser-friendly 18- to 49-year-old demo in the 25 markets with Local People Meters in nearly two years.