Brooklyn Nine-Nine is a genuinely rare thing: a police comedy on TV. But we wouldn’t expect anything less innovative from co-creators Dan Goor and Mike Schur, two maestros of the modern workplace comedy, with each show developing fiercely loyal followers. When it was announced that the comedy starring Andy Samberg was on the chopping block, fans rose up immediately linked arms fight off its cancellation. And after a short period on the television ash heap, NBC came through and basically said, “We’ll take it from here,” which was music to the creators’ ears.

John P Fleenor/FOX

As the show went through the wringer over the past week, Goor, who serves as showrunner, naturally went through a wide range of emotions as he navigated cancellation, renewal and all points in between. He tells Deadline he was also floored by the support from fans — particularly A-listers like Lin-Manuel Miranda, Mark Hamill and Guillermo Del Toro. As the show wraps up its run on Fox with tonight’s season finale, Goor recalls the whole roller-coaster journey, looks ahead to new life on NBC, and sizes up the show’s unique relationship with viewers and how it has evolved over five seasons.

DEADLINE: Where were you and what was your reaction when Fox announced the cancellation?

DAN GOOR: Not to be crude, but when I got the actual phone call I was in the bathroom, which somewhat limited my reaction — physically. Emotionally, I was devastated — I love our cast and crew, I love making the show with them, and I love the show.  That said, I was aware there was a distant chance that we’d be picked up by another platform and that kept me from feeling the full weight of the news. I was kind of in a weird state of shock, sadness, and more shock.

DEADLINE: And where were you and what was your reaction when NBC announced that they would pick it up?

GOOR: I was in my kitchen, trying to make myself feel better by reading all the amazingly nice things people were writing on Twitter. It was around 8 PM (11 PM in NY) so we kind of thought nothing more would happen that night.  But then…I got a text from David Miner that said NBC was picking up the show. I literally screamed. I was so happy. So excited. It was pure joy.  Then I had a bunch of very happy phone calls with Pearlena (Igbokwe) — who was so key to making this happen, Mike Schur, David Miner, and a very, very happy Andy Samberg. Then I wrote thank you emails to Tracey Pakosta (hero) and Bob Greenblatt (superhero), because they did so much work to move the show over to NBC. It was incredible.

John P Fleenor/FOX

DEADLINE: Why do you think so many people connect with the characters of Brooklyn Nine-Nine?

GOOR: I think one thing people like is that the precinct is so diverse and representative and that the characters feel like real people. I think they also really respond to the fact everyone in the squad loves and supports each other and that the comedy doesn’t come from them insulting or cutting each other down. But most importantly, I think people respond to the characters because the actors are so great. The cast is amazing and they are all deeply, deeply likable people who are really specific and interesting and super-talented.

DEADLINE: Speaking of, the fans came through with an outpouring of support when it was announced that the show would be canceled. How much influence does the fan base have on you and the writers’ room? Or do you tend to stay away from the demands and comments from fans on Twitter and other social media platforms?

GOOR: We love the fans of the show so much and we were BLOWN AWAY by the support they have given us. I can’t even comprehend it. To answer your question, I would say that we’re definitely aware of the fans as we’re writing the show, but we try not to let them dictate what a storyline or character development would be. That said, we are very sensitive to how they feel about the characters and the show, and we’re conscious of not doing anything to destroy that bond.  The truth is, we’re fans of the characters, too, so I think our ideas for stories sometimes overlap with theirs — I hope that doesn’t sound corny.

John P Fleenor/FOX

DEADLINE: The diverse and inclusive storytelling folded into the show is done well — which I think makes the show great — but when you first created the show, how mindful were you with that and were you worried that people would see it as a case of tokenism?

GOOR: I wasn’t ever worried about that. When Mike Schur and I created the show, we chose to set it at an NYPD precinct in Brooklyn because that was a vert diverse workplace and surrounding community in real life — representing people from different backgrounds didn’t feel forced, it felt accurate. Furthermore, we have always been committed to making the characters’ diverse backgrounds just one element of who they are and not their defining characteristic. We always believed that if we made the characters fully realized human beings and not 2D representations of an ethnic background or sexual orientation, they would come off as real and grounded and not as tokens.

DEADLINE: Before the talks of Fox cancellation and NBC renewal, did you already have an end game for Brooklyn Nine-Nine?

GOOR: I have a very general sense of an endgame — more an idea of where I want the characters to end up in life than any specific stories or arcs.

John P Fleenor/FOX

DEADLINE: Because of what the show went through in the past week, season five can be considered a landmark season. How was it making this season — which could have been the last?

GOOR: It was great!  I’m really happy with this season.  We experimented with tone and form in episodes like “The Box,” “Game Night,” and “Show Me Going,” which was fun for the writers and actors, and I thought the episodes turned out great.  I really enjoyed writing  — and watching — the Amy-Jake relationship milestones we hit this year. Another highlight of the year was the episode in which Rosa came out as bisexual. I didn’t realize the impact that would have, and reading comments online from people who were moved by it was an incredible experience. But weirdly, the most defining aspect of making the season 5 has nothing to do with making it — the most defining aspect was being canceled and reborn and seeing our fans outpouring of love and support. That made season 5 feel absolutely magical.

John P Fleenor/FOX

DEADLINE: With the season finale “Jake and Amy,” would you have been satisfied if it were the last episode? 

I would not have been dissatisfied. We purposefully wrote an episode that COULD work as the series finale, but it wasn’t the series finale we want to write.

DEADLINE:…but since it wasn’t what can we expect for season 6 and can we expect more fun guest stars?
(Laughs) Honestly, we’ve been so busy recovering from the cancelation and renewal craziness that we haven’t started thinking about season 6, but hopefully, maybe, I’m praying, maybe, hopefully, Lin-Manuel Miranda, Sean Astin, Mark Hamill, Guillermo Del Toro, or Seth Meyers will guest star????