In 1999, a short-lived but memorable TV show called “Freaks and Geeks” premiered and was quickly canceled after 18 episodes. But 20 years later, Paul Feig’s brainchild has become a cult classic that paved the way for many of the acclaimed shows being released today.

Feig, 56, was in his mid-30s when he came up with the concept for “Freaks and Geeks,” a show that follows two groups of outcasts through the trials and tribulations of high school in suburban Michigan during the 1980s.

“I’m just happy we are in a world now where we can do these kinds of stories,” Feig told Page Six in a recent interview. “When we did it back then, it was my reaction to the fact that there weren’t any of these stories. They were all these soap opera versions of teenage years and now, the fact that so much stuff about teenagers got so much more honest in that way, I think it’s great and if anyone took any inspiration from anything we did, then I think it’s fantastic and I’m proud of it.”

Since then, shows like “Friday Night Lights” and “Stranger Things” have created realistic and relatable high school characters.

It took Feig, who at the time was in the middle of screening a low-budget movie of his at colleges, just two weeks to write the first episode of the series. And 12 hours after sending it to his longtime friend Judd Apatow, who served as an executive producer on the show, “Freaks and Geeks” became a reality.

“Overnight my life changed from being a middling struggling actor and wannabe writer/director, to suddenly having a show that was going to be produced by Dreamworks,” Feig recalled.

A couple months later, the show was bought by NBC, and Feig said, “It was kind of off to the races.”

Feig, along with Apatow, director Jake Kasdan and casting director Allison Jones — who received the show’s only Emmy Award — quickly went to work scouring the US and Canada for fresh new faces to star in the series. They had no idea that almost all of the teens they cast — including Linda Cardellini, James Franco, Seth Rogen, Jason Segel, Busy Philipps, John Francis Daley, Martin Starr and Samm Levine — would become some of the biggest names in Hollywood.

“I really had a lot of angst about [a cast of teenagers] going in because this was the era where all these famous kids, who had grown up on TV, were getting arrested and going to jail and having all these horrible things happen to them,” Feig said. “I remember looking at Judd and going, ‘Are we about to ruin these kids’ lives?'”

He continued, “Just seeing how well they all turned out, I am as proud of that as I am of the show. They’re all such awesomely talented people who have gone on to be not only movie stars and famous actors, but directors and writers and producers.”

Throughout the interview, Feig couldn’t stress enough how professional the entire cast was, and described Apatow as a tough father figure on set, while he was the “kindly mother” of the on-set family.

“We encouraged them to be close,” he explained. “Anytime there would be the occasional riff between anyone, we would use it on the show or just play into it because it would naturally work itself out. We tried to help as best as we could, but again there was so very little of that, it was a lovely experience overall compared to what it could have been.”

Along with the actors’ real-life moods being worked into the show, most, if not all, of the plot lines on the series came from the writers’ real lives. Feig, who grew up an only child in Mount Clemens, Mich., wrote the character of Sam Weir (Daley) based off himself and has often said he wrote Lindsay Weir (Cardellini) because while growing up, he desperately wanted a sister.

“I had two bullies who in particular were just absolutely awful to me,” Feig said, explaining how the show’s main bully, Alan, was based off these two real guys. “I was almost 6 foot even when I was that young and they were, like, 4 feet tall, but they knew I wasn’t going to fight back … They took full advantage of it to up their cred as tough guys. Even 20 years later, I have to take my revenge on these two awful guys and so I did in my own way.”

Stories on the screen — like when Sam shows up to school in the “Parisian night suit” or when he asks Cindy Sanders to the homecoming dance the day before — were ripped right from Feig’s real life.

“It’s that kind of lack of perception or realization of protocol that you have when you’re a geek that just defines who you are and defines why you’re a nerd,” he said.

However, the realness of the plot wasn’t enough to keep the show on the air. After just one season, NBC canceled the series. Feig was in a lawyer’s office going through the will of his mother, who had suddenly passed away two days earlier, when he got the news of the show’s ending.

“I couldn’t process it,” he told us. “It felt like I had so many deaths in my family right around that same time. To lose the show and the characters you’ve created, and watched grow and suddenly they’re gone, it’s like they died because they’re just gone. I had so many things I wanted to do with them and so many stories I wanted to tell with them and this cast and it was just gone.”

He added, “You don’t know if any of them are going to work again. You don’t know if you’re going to work again and you definitely don’t think the show is going to be seen ever again.”

Over the years, Feig realized the show was a sleeper hit as more and more people were discovering the series via DVDs, syndication and streaming.

“When I created ‘Freaks and Geeks,’ I remember thinking, ‘Oh, how could this not be a hit? Who wouldn’t want to revisit all the worst parts of their adolescence, but from a safe distance and laugh at it?’ I realized soon into the season that not a lot of people wanted to relive that,” Feig said, adding, “I think now, people are much more willing to relive those moments and to connect with them. It’s like therapy, really.”