Before there was “Riverdale,” there was “Saved by the Bell.”

The NBC sitcom that premiered in 1989 and ran for four seasons proper (not including its predecessor “Good Morning Miss Bliss,” or its subsequent spinoffs “The College Years” and “The New Class”) followed a core group of high school friends as they dated each other, attended school functions, schemed against authority figures and solved adult problems, all in the span of one episode.

The CW’s “Riverdale” may be the actual Archieverse series, but “Saved by the Bell” was the first to feel truly born of that classic comic book. Its characters fit the archetypes, including the girl-next-door, the jock, the rich and fashionable one, the nerdy one and the one who is always in trouble. They even had their own band, participated in sock hops and had Casey Kasem drop in on them a couple of times. And, their high jinks felt ripped from the larger-than-life pages, while their jokes often felt of an earlier era.

Since the show started as a Saturday morning series, its main competition was cartoons, and that allowed the story to go to some big, magically-real places. This included with its central character of Zack Morris (Mark-Paul Gosselaar). At first glance Zack seemed like an average teenage boy who loved the beach, baseball and one girl in particular (Kelly Kapowski, played by Tiffani Thiessen), but he concocted some pretty devious plans over the years, broke the fourth wall to talk directly to the audience and also had time-freezing abilities within the world of the show.

Even when they were dealing with some pretty out-there scenarios, such as Screech (Dustin Diamond) getting struck by lightning and suddenly being able to see the future or Zack convincing the school board to stop a major oil company from drilling on the football field, “Saved by the Bell” also offered some heartwarming lessons about second chances, forgiveness, love and friendship that proved to be essential for its young audience as they, too, entered the halls of high schools across the world.

As Peacock prepares to premiere a new version of “Saved by the Bell,” featuring the original characters all grown up and with a new crop of students, Variety looks back on the original series to select the best 30 episodes.

Editor’s Note: The below ranking only includes in-season episodes of “Saved by the Bell” proper, not the aforementioned surrounding series, nor its two made-for-TV movies that have been split into episodes for streaming.