“Brooklyn Nine-Nine,” Fox’s sitcom about a squad of New York City detectives and their captain, the first out gay officer in the NYPD, pulls off an incredible balancing act. It presents its officers, most notably Andy Samberg’s Detective Jake Peralta, as smart and competent even while acknowledging that the NYPD has a long way to go to meet the needs of all the city’s residents. The series flashes back to the discrimination that Capt. Raymond Holt (Andre Braugher) experienced in the 1980s, while arguing that police departments have a lot to gain from welcoming cops from communities that historically might have been excluded from police service. And it does all this while being one of the most consistently uproarious shows anywhere on television.

As part of my reporting for my series on depictions of cops in popular culture, I spoke with series co-creator Dan Goor about how to calibrate comedy about policing, how he and Michael Schur designed Holt’s groundbreaking character and how to model good policing and community engagement. Our conversation has been edited for clarity and length.

I wanted to start by asking you about influences on the show. Obviously police shows are one of the most common kinds of shows, but there have not been a lot of comedies in the genre, so when you guys were in the process of creating “Brooklyn Nine-Nine,” were there cop shows, or even other shows entirely, that you saw as an inspiration or that you wanted to draw from?

I would say there were three sets of influences. There were cop shows that were not comedies, there were cop shows that were comedies, and then there were comedies that were not cop shows.

So, the cop shows that were not comedies and cop movies, like “Beverly Hills Cop” or “48 Hours” or, obviously, “Die Hard,” which resonates throughout the show, or, which, you know, reverberates throughout the show, which we frequently cite, were influences. The aspects of those things that were influences were the fact of police work itself, it felt like an exciting area to tackle, just in terms of telling stories. And also Mike Schur, my co-creator, and I had worked on “Parks and Rec” together, and at “Parks and Rec,” there was a difficulty, which was setting up what a story was in such a way that the audience could understand it because it was such a nuanced, or a rarified, world, specifically the world of small-town government. So we often had to have pages of exposition to explain why it mattered to Leslie Knope that they were passing a bill. Where with a cop show one of the things we really liked was the exposition was immediate and obvious. It was somebody’s been murdered, we have to solve the murder. …

In terms of influences, shows like “The Shield,” “Law & Order,” those kinds of dramatic cop shows were influences, and also we liked the dynamic that develops between the detectives in those kinds of shows. Then, obviously, shows like “Barney Miller” and to a lesser extent “Naked Gun” or “Police Squad” were influences.

“Barney Miller” was more of an influence because it was a police show that was really a workplace show. It was very true to life, in fact, much truer to life than our show. If you ask cops, this is always cited, if you ask cops what the most accurate depiction of a police force is, drama, comedy, movies, anything, they will all say “Barney Miller.” That was an influence for us as well. And then, shows like “The Office” and “Parks and Rec,” which Mike and I both worked on, were influences, just in terms of the way we tell stories, and the dynamics between the characters. So there were influences that were both in the cop world and outside of the cop world.

So to follow up on that, you’ve mentioned the idea of the workplace comedy a couple of times. Clearly, I can see a lot of the dynamics from “Parks and Rec” playing out in “Brooklyn Nine-Nine.” Were there particular adjustments you had to make for a higher-stakes workplace?

One of the adjustments we made is we wanted to make sure our characters immediately were good at their jobs, because it felt like it was going to be hard to laugh at the hijinks and the goofiness of these cops if you felt like “But there’s a bad guy getting away because they’re joking around!” Whereas if you felt like “Oh, yeah, they’re joking around but they always get the bad guy,” we thought that would work. So therefore, that was an adjustment.

In the early years of “Parks and Rec,” Leslie was less adept at her job, and almost nobody in the office except for Leslie really cared about what they were doing. And that was an adjustment over time to where they were all super-competent and all, even though they had their own separate agendas, wanted to support Leslie’s. We started out from a much more supportive, directed stage because we thought that would help with the comedy. 

I wanted to talk a little about calibrating the comedy on a cop show. … I’ve noticed that “Brooklyn Nine-Nine” mines a lot of humor out of the stupidity of criminality, and some of the absurdities or — I don’t know that eccentricities is the right word — of police work, but it’s a show that’s very careful not to make light of the consequences of crime or crime victims. And I was wondering how you calibrate the jokes on the show? Are there things that are off-limits? How do you write jokes about crime? It’s a really interesting challenge and I’d be curious to know how you guys do it.

This was a really big question when we first started writing the show and then we sort of, it was a trial-and-error approach, I think, at first, in terms of what crimes we could address in the first place.  There was a murder in the pilot, but we had a big debate as to whether murder was a thing that the show could do, and then we’ve done a bunch of murders. …

But I think a major thing that we did, and I don’t know that we did it consciously, but now we’re very consciously aware of it, is that not only do we not make fun of the victims, we very rarely deal with the victims. And that is, I think, the way in which we can focus on the funny things that cops do, the absurdities of being a cop, and the idiocy or even cleverness of the criminals, is not to focus on the victims, because there’s a lot less — depending on the crime, but most crimes — there’s a lot less comedy in the plight of the victim. Which is not to say that as human beings we don’t think the plight of the victim is far more important than that of the criminal. But as a comedy show, I think that allows us to deal with many other crimes. For instance, if we did an episode where they were investigating a murder, and we spent a tremendous amount of time with the grieving parents of the victim, it would be hard to make that funny.

Because the show is so deeply engaged with NYPD history and procedure, I was wondering if you could talk a little about your research process and your technical advisers, because there’s clearly a lot of detail here and I’d love to know a little bit more about where it comes from.

We have two sets of technical advisers. We have a couple of guys who are fantastic who were in the Glendale police in California and who now do this, and they’re also private security consultants, and they work with police consultants all over the country, they’re really fantastic. And they’re really valuable, they actually have a lot of dealings with the NYPD, so they’re pretty useful for NYPD information. But mostly they’re valuable for actual tactical expertise. Like, you would use this tool to go into that door, you would hold the gun this way, you would ask a perp this question, or you wouldn’t do this, or you wouldn’t do that. And then we say, “But it’s a TV show!” And they say, “Okay, you can do it, but it’s wrong!” For instance, we’re about to have someone hold up a piece of evidence, and they’ve put it in a plastic evidence bag. And our technical advisers were like, “That would never happen, it would be in an envelope, a paper envelope, because that is better for DNA evidence.” And they went on and on, and I said, “Yeah, but we gotta see it on camera, so it’s going to be in the plastic envelope.”

And then I have a friend in the NYPD who was very helpful especially in talking about Holt early on, and helping us to sort of formulate his character.

Could [you] tell me a little bit more about how Holt changed over time?

Our premise had always been that Holt was an openly gay cop … and an excellent cop, and despite how effective he had been as a policeman and a detective, the fact that he was out had completely stifled his career but things were changing and he finally had his first command. And the idea he wasn’t going to let Jake and Jake’s goofiness screw up this thing that he’d always wanted.

And the nuance that my friend added was he said, “Things actually really changed in the ’90s, and in fact, the NYPD became much more open to gay officers,” and my face fell because I said this is the whole premise of our show. But he said, “The interesting thing is, an officer like Holt with a record like his, who is openly gay, very well might have been immediately assigned to a PR department and made sort of a figurehead, a tool of recruitment, and a sign of the change in the NYPD. And with the character you’ve developed, that would be just as bad, because he wants to be a captain of a precinct. He doesn’t want to be a poster child.” And so that all was great, and we baked that into the backstory for Holt. And that all comes out in the pilot, and then later as a punishment, his nemesis puts him back in publicity because she knows he hates it.

This hadn’t occurred to me, but had you initially envisioned him as both gay and black?

Let me see. In our very first conversations, I don’t know that we talked about his race as much as we wanted him to have overcome something, overcome a prejudice, and we felt at the time like it would be interesting to make that, that in an effectively paramilitary organization like a police department was a great obstacle. And then we looked at all sorts of actors, and our casting director said, “What about Andre Braugher?” We were sort of saying “It’s got to be someone with gravitas, somebody who’s a great actor, someone like Andre Braugher.” And then they were like, “What about Andre Braugher?” And then we met with him and that’s who we chose. So I don’t think so. We definitely looked at all sorts of people.

I also wanted to ask you about another aspect of his character, which is, I think when people think about suspicion of the police, they often think about it coming from poor people of color who have a lot of police interventions in their lives. And I thought it was really interesting how when we meet Holt’s husband, we see a class-based resentment for the cops that’s obviously very personal for Holt and Kevin, his husband, but you see this sort of upper-class, Columbia professor milieu that is skeptical of the police department as sort of un-enlighted. I was curious how that that came together because that’s something we see a little bit, it actually shows up a lot in John McTiernan movies, including “Die Hard.” But that is a strain of thinking that is really prevalent among wealthier liberals but not something that gets addressed very much.

I am very interested in doing an episode down the line where there’s a dinner party at Holt’s house and Kevin’s liberal, white colleagues are in the position of, in essence, pointing out the flaws of the police, or arguing with Holt and saying, “How can you be a police officer?” And he’s in the position of having to defend the police, which seems like an interesting stew to put him in.

You’d mentioned earlier the influence of ’80s action cop movies on the show. And I was curious about how that dynamic between being a badass action cop and doing things in a way that’s more procedurally and legally sophisticated sort of developed. Because that seems like the big tension in Jake’s character. He admires Jimmy Brogan, he loves the idea of being in his real-life “Die Hard,” but he also wants to be a more modern kind of cop. I would love to know the process of developing that tension for him in particular and the show more generally.

I think that’s in some ways the central tension of Jake. In some ways the love of “Die Hard” movies and being an action hero is the little kid aspect of Jake, the sort of wide-eyed, get to play with a gun, get to be a cop in a movie, and then the sort of, the maturing part of Jake is understanding that there’s something more important than that. At his core, we’ve always made it so that Jake — this is pretty corny sounding — Jake wants to catch bad guys. If he can do it while acting like John McClane, then that’s all the better. But his goal is always catching bad guys, and we did this episode, “The Chopper,” where Holt gets mad at him because he thinks, you just care about riding in a chopper. And Jake is like “No, it was never about the chopper. I mean, yes, I would love to ride in a chopper, but it was about catching these bad guys. I had a lead and I was following my lead and the best way to get there was the chopper.” It is the central tension, it is a central tension. His arc is learning how to, I guess, to some extent one of his arcs is learning how to control that kind of childish impulse.

Have you ever felt like there’s been a story where he has followed his action impulses too far?

Yeah, we’ve tried to tell those stories. And usually the way we do that, again, to protect the innocent, it usually rebounds on him. I think “AC/DC” is kind of the best example of that. And we did another one, to a certain extent, “Unsolvable.” But in “AC/DC,” he’s injured and he refuses to stop working a case, and he continues to get more and more injured. …

It’s tough. That’s where it comes to the central difficulty of a cop show, which is on most shows you can do a thing where a person makes a mistake, a goofy mistake, a comedy mistake, and it has implications in their job. But with a cop show, it’s hard to do that. We have done it, there have been a number of times where we’ve done it. We’ve done it in “The Stakeout” where Charles gets mad at Jake and throws a ball through the window and then gives away their stakeout position.

But we try to do it pretty infrequently because it feels like it’s less funny. It’s one thing if the mistake … means you have to eat a lot of chocolate candies on a conveyor belt and nobody really cares that that candy company in “I Love Lucy” didn’t have that many boxes properly packaged at the end of it. But they might care that, like, the murderer got away because Jake decided that doing a big fart noise was funny at that moment.

One of the big subplots of the first season was Terry’s [Jeffords (Terry Crews)] anxiety about guns. I’ve noticed that the cops on the show don’t pull their guns a lot. They rarely discharge their weapons. Do you have internal guidelines for gun use on the show? Or is there a sort of threshold? I’m just curious about what you think about when guns play a role in an episode.

The interesting thing with Terry specifically is because now he is, by the end of the first season, he was over his apprehension of guns as a character. I mean we sometimes reference it, but it’s not a fundamental aspect of his character. And that was not a political or ethical decision. It was just … over the course of the season, scared Terry seemed less funny on screen than confident Terry. And so that was a change we made really for the comedic value and less for any other reason.

In terms of the other stuff, in real life most cops have never pulled their gun. Most NYPD cops have literally, I think, I know that almost none of them as a percentage have discharged their weapon. But I think very few of them have pulled their weapon. … To a certain extent, we don’t have them pull their guns all the time because it feels realistic to have them not pull their guns all the time. And it feels, sometimes, a little cartoonish or movie-ish if they’re constantly in a situation where somebody has a gun to their head or where they’re in a face-off with somebody. That said, it is a TV show. And you want exciting stuff to happen. So it certainly happens to them a hell of a lot more than it happens to anyone else.

We try not to have them pull their guns unnecessarily. We try not to have them pull their guns in a situation where a real cop wouldn’t pull their gun. … Sometimes you have to do that because it’s a TV shorthand that everyone has come to accept. I think a lot of the time, cops will just take a person down physically, or they will just handcuff them and there’s no gunplay involved whatsoever. But we’re so used to seeing it on television show, that it’s the language of a television show to a certain extent.

I wanted to ask about one of the aspects of the show that I find really interesting, which is the extent to which the officers are really integrated into their communities. Boyle’s an obsessed foodie, Gina has her various rotating dance troupes, Rosa’s mentoring, Holt has this whole hook-up with Columbia. Was this a deliberate choice, because I know pop culture often depicts cops as sort of alienated from the communities they serve. And that’s just a very tonally different thing, plus a source of a lot of really good ongoing jokes.

That was deliberate. At “Parks and Rec,” one of the more fun things when writing there was building the world out and meeting people who lived in Pawnee. So from the very start, the idea was, and one of the reasons we chose Brooklyn, was because it felt like a fun community to explore. Brooklyn especially since it’s got a mix of everything. It has hipsters moving in, it has Park Slope moms, it has Hasidic communities, it has Polish communities, Ukrainian communities, it has old Italian communities, it’s by the beach, there’s a warehouse area, there’s a park that has Fifth Avenue-style mansions on the side of it that Hollywood celebrities live in. So it felt like a microcosm of the city, and to a certain extent, of more than the city, of the world. And so the intention was always to fill out the world and have them interact with it.

But do you think it changes the tone?. … Do you think it changes the show’s orientation a little bit? This is never going to be a series about Vic Mackey preying on the community or the cops sort of hating the people that they have to deal with. It’s, I mean I think it works for you guys comedically, but it’s also, it just sends a very different message about who cops are and what they do.

I think the risk is that it seems like we’ve got our head in the sand in terms of what’s going on with the world and with the community. We’ve tried to address it a few times and I think we could do a better job and a bigger job, a more complete job of addressing it, and I’m hoping we do some episodes that address the tension between communities, currently, and the police. I think the sort of maybe delusional answer I would give is we are modeling what a good police-community interaction would be like, and we are modeling what a good squad is, a group of cops who really care about their community and who act appropriately towards it, and who are interested in catching bad guys and protecting good guys. … And I mean, also, the world has changed so much in the four years since we started this show. I think if we were designing this show from scratch now, we might have built in more of the current tension.