Image Credit: Everett CollectionTruly surprising moments are pretty rare on television, but the team behind Newhart cooked up a classic twist ending for the show’s risky series finale, which attracted almost 30 million viewers when it originally aired. During the last two minutes of the episode, Bob Newhart, who’d spent the previous eight seasons playing Vermont innkeeper Dick Loudon, wakes up in an oddly familiar bedroom. “Honey, wake up, you won’t believe the dream I just had,” he says, right before bedmate Suzanne Pleshette, who played his wife, Emily, on popular 1970s sitcom The Bob Newhart Show, rolls over. Big reveal! The eight seasons of Newhart — and thus the very existence of Dick, his charming wife, Joanna (Mary Frann), and even dimwitted woodsmen trio Larry, his brother Darryl, and his other brother Darryl — had been nothing but a wacky, indigestion-fueled fantasy within the more realistic world of Newhart’s earlier comedy series. “To me, it was the ultimate wink-wink, nudge-nudge kind of thing,” says Newhart, who is now 80 years old. “The audience was in on the joke.”

It was Newhart’s real-life wife, Ginnie, who first came up with the idea for the

crazy ending. At a holiday party during the series’ sixth season, Newhart told her that he was thinking about leaving his show after CBS moved it to a new time slot. “Without missing a beat, she said, ‘You ought to end it with a dream sequence where you wake up in bed with Suzy,'” Newhart says. Pleshette happened to be attending the party as well, and he immediately ran the concept by her. “She loved the idea. She said, ‘I’ll be there in a New York minute!'”

Most viewers loved the unprecedented ending too, and today the Newhart finale is considered a classic, joining shows like M*A*S*H, St. Elsewhere, Seinfeld, and The Sopranos on the list of the most-discussed series enders ever. “People still come up to me and talk about it,” says Newhart. “It’s held up to other shows as the standard.”