TV

Is ‘Brooklyn Nine-Nine’ really TV’s best comedy?

The television world and Twittersphere was shocked last Sunday night when Fox’s struggling cop comedy “Brooklyn Nine-Nine” won awards for both best TV series, musical or comedy, and for its star Andy Samberg, who plays Det. Jake Peralta. But no one seemed more shocked than Samberg himself.

“Oh no!” he said on stage, after mouthing the word “wow” when his name was called. “I didn’t prepare anything!”

Samberg sped through an ad-hoc thank-you speech, but the shock was likely real: Not only is his show having trouble bringing in viewers, the “Saturday Night Live” alum has not exactly been as well-reviewed as his fellow nominees: Michael J. Fox (“The Michael J. Fox Show”), Jason Bateman (“Arrested Development”), Don Cheadle (“House of Lies”) and three-time Emmy winner Jim Parsons (“The Big Bang Theory”).

So is “Brooklyn” secretly the best comedy on television? Well, no. While it’s certainly less mind-numbingly broad as fellow nominees “The Big Bang Theory” and “The Michael J. Fox Show,” and not as played out as the faux-confessional style of “Modern Family,” it has a long way to go to be as holistically charming and clever as “Parks and Recreation” or as groundbreaking as “Girls.”

But it is undoubtedly underappreciated, and its stellar cast has already provided plenty of opportunities for wacky crime-based adventures. The diversity of the cast — the eager-to-please Amy Santiago (Melissa Fumero), and the caustic, tough and slightly mysterious Rosa Diaz (Stephanie Beatriz), the hulking but insecure Sgt. Terry Jeffords (Terry Crews) and the stoic and openly gay Capt. Ray Holt (Andre Braugher) — is refreshing. So is the antic comedy, which is a reprieve from the sitcoms and police dramas on the rest of the dial.

“It always feels like some kind of validation because we won an award,” Dan Goor, the show’s co-creator, tells The Post. “There are so many options in television that everything takes a little while to catch on these days.

We’re just grateful to be on TV at all. It’s nice that people already seem to like it and that we’re already winning awards, which is more than we can hope for.”

Critics gave the show’s pilot mixed reviews, and it still hasn’t officially been given a green light for Season 2 yet.

The Post’s Michael Starr said: “It’s troubling to see an actor of Braugher’s stature waste his time, and his talent, in such a dumb show.”

Others saw potential: TV Guide’s Matt Roush said the show “earns its badge of distinction with smart irreverence and sharply defined characters in an admirably diverse ensemble.”

The cast celebrates its surprise win at the Golden Globe awards.Reuters

That diversity keeps coming up when people praise the show, says Brad Adgate, media analyst at Horizon Media, which could help it survive.

“It’s a very ethnically diverse cast,” Adgate says. “That’s kind of the wave of the future.”

“Brooklyn Nine-Nine” didn’t appear to get a post-Globes ratings boost either: it actually ticked down in demographic ratings in its first broadcast after the ceremony.

Goor says the producers have been adapting the show as the episodes progress after seeing how the characters interact. It’s a skill he learned from Michael Schur, the co-creator of “Brooklyn” and “Parks,” and Greg Daniels, the creator of the American version of “The Office.”

“As you shoot the show you begin to see the strengths of your cast and write to your strengths,” he says. “The pairings of the cast leads to different types of [episodes] over the second half of the season, it’s blossoming into a goofy but lovable cop comedy.

Fox is giving the series a boost by showing it after the Super Bowl this Sunday. Goor says the episode will involve a hotel heist case and cameos from Fred Armisen and Joe Theismann, among others.

Adgate says the show is starting to remind him of another Fox sitcom that could never quite find the ratings: “Arrested Development.”

“That show won an Emmy and you would assume that would increase ratings and it would put it more on the radar for viewers and that didn’t happen,” he says.

Schur and Goor were the brains behind “Parks and Recreation” (for which Amy Poehler also won her first Globe this year). But that show also took some time to come into its own: it started as a local government knock-off version of “The Office,” and grew into something way better than “The Office,” with zeitgeist-grabbing comedy zingers and the development of one of the greatest characters in modern sitcom history, Ron Swanson (played by Nick Offerman).

Like “Parks,” “Brooklyn” is helped along by being an actual workplace comedy: the cops go after real crimes, and, even though the outcome is usually predictable — Samberg’s character screwing up until he brilliantly solves the case at the last minute — the crime scenarios keep it fresh (unlike, say, “The Office,” which resorted to increasingly lame gimmicks to make office life seem interesting).

For all the award prestige, the cast and crew jumped right back into the grind, hoping the audience followed along.

“It felt like the world changed on Sunday night and then 7 a.m. Monday morning was call time,” Goor says. “All the actors were back there, we were in the writing room, working our asses off to get the script done.”

Best episodes of “Brooklyn Nine-Nine”

1. Episode 3: “The Slump”

Jake’s (Andy Samberg) slump worsens as he gets soaked with urinal water.Eddy Chen/FOX

“The Slump” is a great example of how this ensemble plays off each other. The story involves Peralta (Andy Samberg) trying to overcome what he fears are superstitious causes behind his slump in breaking cases, but the side plot between Terry Crews, as the sergeant who can’t figure out how to build a simple dollhouse, and Joe Lo Truglio is the real gem here.

2. Episode 4: “M.E. Time”

Det. Jake Peralta (Andy Samberg, left) and Det. Charles Boyle (Joe Lo Truglio, right) in “M.E. Time.”Eddy Chen/FOX

Here, the writers established Capt. Holt’s stoicism as a running joke. When Santiago (Melissa Fumero) inquires if Holt (Andre Braugher) had a rough weekend, he responds, “I went to Barbados with my husband. We wove hats of palm fronds. We swam with the stingrays. I’ve never been happier.”

3. Episode 9: “Sal’s Pizza”

Det. Jake Peralta (Andy Samberg, right) fights Fire Marshall Boone (guest star Patton Oswalt, left) in “Sal’s Pizza.”Eddy Chen/FOX

This episode plays up the rivalry between the NYPD and FDNY. The fire department is represented by Patton Oswalt, who plays a bumbling fire commissioner resisting an NYPD takeover of an arson case. But the real star is Lo Truglio, who yammers on about his ranking of Brooklyn pizzerias, and which has the best mouthfeel. He even uses a spit bucket.