An appreciation of Captain Raymond Holt, one of the NYPD's finest — and one of broadcast television's funniest characters.

Back in the very first episode of “Brooklyn Nine-Nine,” goofy but dedicated Detective Jake Peralta (Andy Samberg) tries to catch a criminal, but his real problem is this: His new boss, Captain Ray Holt (Andre Braugher), wants him to wear a necktie. It feels like a trivial problem when compared to serious police work, but Holt holds firm, establishing himself as the Establishment — “the man” against whom Jake naturally wants to revolt.

At the end of the episode, Jake realizes that Holt’s desire for him to wear a necktie isn’t a petty whim, but a desire to create unity within the squad. The dynamic between the two is seemingly established…except, as the show progresses, it isn’t. Since those early days, Captain Holt has become one of TV’s most interesting and hilarious characters, a fascinating evolution that continues with the premiere of Season 5.

Holt is part of a comedy formula established previously by co-creator Michael Schur on “Parks and Recreation” — the older curmudgeon paired with a lighter, more optimistic underling. But to simply consider Holt a new iteration of Ron Swanson does a grave disservice to the depth of character development behind Braugher’s character.

While “Nine-Nine” Season 1 isn’t perfect (remember Boyle’s unrequited crush on Diaz, which did neither character any favors?), one thing it did well was slowly reveal Holt’s many layers, from how his sexual orientation not only affected his career but his own ego, and how a universe of emotions was buried behind Braugher’s stoic expression.

As a black gay man who worked tirelessly to advance in a system geared to reject him, Holt has the best deadpan in primetime, but he also has vulnerabilities and humor. And the show really began to find Holt’s potential when he stopped being the disapproving captain and started actually having fun.

The process began slowly, such as in Season 1’s “Thankgiving,” when Holt embraced the fake backstory created for him by Peralta, shouting at a squabbling family that “My wife was murdered by a man in a yellow sweater! It’s the one case I can’t solve.”

It all came to a head in the Season 1 finale, when Holt not only goes undercover as a ballroom dancer, but charms a woman for some key information in a sequence which proves devastatingly funny. Braugher’s delivery of the line “They always want… what they can’t have” should be studied by the highest levels of academia. It belongs in a museum.

Since then, “Brooklyn Nine-Nine” has always managed to find a balance between remaining true to Holt as a figure of authority within the department while also letting him actually cut loose and have fun with the squad from time to time. An entire episode, in fact, was devoted to establishing this groundwork: In Season 2’s “Beach House,” Jake invites Holt to join him and the other detectives for a weekend away, but while Holt’s presence initially kills the party, eventually things turn around after Holt embraces the fact that they want to blow off some steam by making fun of him — and he joins in on the joke.

No shortage of credit is due to Samberg’s work as, essentially, an anti-straight man; the joy that washes across Peralta’s face every time Holt surprises him is always the perfect button to the joke. But the degree to which Braugher is game for whatever the writers throw at him — up to and including intense model train building, participating in an annual Halloween prank war and suffering from massive swollen nodes after contracting the mumps — is even more key to what makes Holt work, and that has led to Braugher receiving three consecutive Best Supporting Actor Emmy nominations.

But in addition to allowing Braugher display his genuine comedy chops, Holt’s transition from opponent to ally has allowed the show’s focus, on a plot level, to focus on the actual crimes being investigated by the squad. Finding the comedy in police work is a tough challenge (especially if the word “Academy” isn’t a part of the title), but it helps that rather than be a show about Peralta fighting a battle on two fronts, he and Holt are now close allies.

They might all have different approaches and different attitudes, but “Brooklyn Nine-Nine” has become a show about a family that takes down the bad guys. And at its core is Holt, who may never crack a smile, but always gets the job done — and may even, from time to time, admit he’s having fun doing it.

“Brooklyn Nine-Nine” airs Tuesdays at 9:30 p.m. on Fox.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.