The Big Bang Theory series finale attracted a big name guest star, shocking viewers at home before Leonard, Sheldon and the rest of the gang said their goodbyes. Buffy the Vampire Slayer star Sarah Michelle Gellar made an appearance.

"...Is that Buffy the Vampire Slayer?" pic.twitter.com/Yg1nWENToK — The Big Bang Theory (@bigbangtheory) May 17, 2019

Before the episode aired on CBS, Entertainment Tonight promised there would be a "shocking celeb cameo" from someone who has never appeared on the series before. "Shocking" was an understatement.

The Big Bang Theory has a long history of attracting guest stars from real popular scientists like Bill Nye the Science Guy and Stephen Hawking to beloved pop culture figures like Carrie Fisher, James Earl Jones and William Shatner. The show even booked Mark Hamill to officiate the wedding of Sheldon Cooper (Jim Parsons) and Amy Farrah Fowler (Mayim Bialik).

Several guest stars have also nabbed Emmy nominations for their roles. Christine Baranski, Laurie Metcalf and Bob Newhart each picked up nominations for their work. Newhart, who played Sheldon's beloved childhood TV star Professor Proton, won Outstanding Guest Actor in a Comedy Series in 2013.

The Big Bang Theory is ending after 12 seasons, once Jim Parsons said he would not sign on for a 13th season. The show will end with 277 episodes, more than Cheers, and is the longest-running sitcom in primetime history.

"It's very bittersweet," Johnny Galecki, who plays Leonard, told CBS This Morning Thursday. "The quote from Winnie the Pooh keeps coming up in my mind, the 'how lucky I am to be this sad to say goodbye' to something. You know, we all feel very, very grateful, but the timing is right."

Kaley Cuoco, who stars as Penny, said the last episode was "beautiful."

"There's a lot of anxiety for months on how this is going to end, for the writers and for us too. And I'm really trying not to be biased, but it's one of the sweetest finales I think I've ever seen," she explained. "I don't know how someone could not enjoy this. It's very heartfelt in a time where I feel like we need – I don't know, it's just kind. Every character does have a wonderful moment."

While fans will miss out on seeing The Big Bang Theory characters as adults, Young Sheldon, the prequel series about Sheldon growing up in Texas, was renewed for two more seasons. The show's Season 2 finale will include references to Penny and the other Big Bang Theory characters as children.