The season 4 finale of Fox’s “Brooklyn Nine-Nine” left off with two of the squad’s most integral characters, Detectives Jake Peralta (Andy Samberg) and Rosa Diaz (Stephanie Beatriz) incarcerated for a crime they didn’t commit after trying to infiltrate a dirty squad headed by Lt. Melanie Hawkins (Gina Gershon). When the fifth season premiere begins, therefore, the squad is broken up, as two of their members are still behind bars, leading the rest of the precinct to carry on without them – and try to find a way to get them out.

Ahead of the season 5 premiere, Variety spoke with showrunner Dan Goor about what fans can expect tonally from the new season, as well as what it means to hit 99 episodes, which is more important for “Brooklyn Nine-Nine” than the traditional 100.

Jake and Rosa must be in different jails at the beginning of the season, so how will they coordinate?

Their stories are mostly with other members of the cast [while they’re in jail]. And also Jake has a cellmate, Tim Meadows, who plays a cannibal, who’s absolutely hilarious, so we see a lot of Jake with his cellmate.

Can we expect characters that Rosa and Jake meet in jail to hang around?

At this point, no, they kind of go away. Although I’d rather not talk too much about what happens after they get out of jail because I don’t want to spoil when they’ll get out of jail. But the aftereffects of prison do linger on. We’re trying not to make it just a thing that happened that we ignore. Certainly, I think some of those characters could come back, we just haven’t broken that yet and in theory they’re in jail.

So is the season a little darker?

I think the start of the season is a little bit darker, but still fun and funny and still “Brooklyn Nine-Nine”-y. That might sound silly, but we spent a lot of time making sure that even though Jake and Rosa are in prison and prison is hellish, we’ve found a way to make it something fun to watch.

Amy Santiago (Melissa Fumero) and Jake have a very admirably stable relationship at this point. How will Jake being in jail complicate that?

Jail is definitely trying for the two of them. But because of their stable relationship, we’re not playing it like their relationship is at risk. I think that there will be fun stuff this year for Peraltiago shippers for sure.

Can we look forward to an engagement?

No comment!

Chelsea Peretti’s on maternity leave, so does that mean the show won’t explore more of Gina’s pregnancy?

Chelsea and Gina are both on maternity leave, so Chelsea’s not in at least the first eight or nine episodes. We saw a little bit of it at the end of last year, but Chelsea would kill me if I made her put on a pregnancy suit.

That’s fair. How much more Milton Boyle (Ryan Philippe) will we get then?

Questions about that sort of stuff are more second half of the season, I think, because [Gina’s] not really in the first half of the season. So that’s difficult to say.

Everyone on the show is an incredible comedic actor. Have there been any particularly great improvisations so far?

There’ve been some really terrific ones. Andy is a master comedian; he’s unbelievably funny and a good writer on set and a good improviser on set. There’s an episode, which is a runner, where he and Joe [Lo Truglio] are doing very silly, very complicated high-fives. And they came up with a high five on set which was a “humble-five.” They start to give each other a high-five and then stop and in unison say, “I really shouldn’t.” It was really funny to watch.

In season 4, we saw both Holt [Andre Braugher] and Jake and Jake and Rosa sort of paired off for a few episodes. Is that something done consciously to develop relationships?

I don’t know. Ironically, this season I would say we’re gonna end up telling more stories that just have an A and B story. Generally, we’ve always kind of done an A, B, and C story. I guess we’ve done a few runners where two people are paired off for longer, but I’d say the only two we’ve done like that, where it’s a long period pairing, are Jake and Holt in Florida and Jake and Rosa at the end of last year. So I don’t think it’s a conscious thing. We really try to make sure we’re mixing the pairings up as much as possible.

How do you feel the goals of the writer’s room have changed since the beginning of the show?

I think the primary goal of the writer’s room – which is to tell funny, interesting stories that have heart in them – has not changed. I think that we have tried over the last couple years to tell some stories that approach social issues such as the episode “Moo Moo” last season, and we’re going to try and do an episode or two like that this season, and that’s not something we did in the very beginning of the show. I think as the show ages, the other thing is just trying to make sure the writers are constantly finding new but believable and funny aspects of the characters and stories to tell. In the beginning, it’s easier to come up with stories but harder to figure them out. But later, there are fewer stories but it’s easier and easier to break them. So you’re always working just as hard is my point. I guess I’m asking people to feel sorry for me.

You’re reaching the 99th and 100th episodes this season. How does reaching milestones like that impact the writing?

That’s a question that we asked ourselves a lot. I think there are a lot of different approaches to hitting a milestone like that. There’s doing an episode that looks back on where you started and the highlights of the show, there’s a version that’s like an apotheosis of “Brooklyn Nine-Nine,” and there’s a version where some major character moves happen or set you up for what the future is gonna be. We sort of took a little bit from all of that. There’s some nice recognition of the start of the show and how far the characters have come and there’s some major character movement. And we put a lot of pressure on ourselves to make it big and very funny, and very “Brooklyn”-y with real moments for each character that felt “Ah, that’s so Jake,” or “That’s so Charles.”

“Brooklyn Nine-Nine” season 5 premieres on Fox Sept. 26 at 9:30 p.m.