Terry Crews and Andre Braugher in the “Moo Moo” episode of “Brooklyn Nine-Nine.” (John P. Fleenor/FOX)

When the television gods give you a gift, maybe it’s churlish to ask for even more from them. That’s the best way to describe how I feel about “Brooklyn Nine-Nine,” Fox’s wonderfully funny, deeply felt police comedy, which the network chose not to renew on Thursday. I’m going to miss the series, which over its run probably gave me more pure pleasure than anything else airing concurrently anywhere on the dial. And I’m so grateful that we got as many episodes of it as we did.

In another era of television, “Brooklyn Nine-Nine” never would have made it to five seasons and the 112 episodes it will have aired by the time it closes out its run on May 20. 6.17 million viewers tuned in to the pilot, and it was generally downhill from there; fewer than 2 million people watched the last 10 episodes of the fourth season, and the 2 million who watched the first episode of this final season were as good as it got.

When network TV was built to produce mass cultural phenomena, that 6.17 million initial viewers would have been a death sentence. In its last season on NBC, “Community,” which came to represent a new model of a small network TV show kept alive by the passions of its fans, was still pulling more than 2 million viewers per episode. Cultural fragmentation saved “Brooklyn Nine-Nine” for as long as it did, but our new reality couldn’t keep the series alive forever.

But while we had it, what a show “Brooklyn Nine-Nine” was.

I cannot begin to count the number of times that the series left me literally helpless with laughter: the sight of strait-laced Captain Ray Holt (Andre Braugher, revealing impeccable comic timing) declaiming “Hot damn!” or “Vindication,” or telling his sister Debbie (Niecy Nash) “I cannot even”; the spectacle of civilian specialist Gina Linetti (Chelsea Peretti) driving Neil deGrasse Tyson slowly insane; the devolution Holt and Detective Jake Peralta (Andy Samberg) experience as they suffer from the mumps; Peralta’s visit to a Florida gun store; Sergeant Terry Jeffords’s (Terry Crews) plot summaries of the books in a “Wheel of Time”-like fantasy series called “The Skyfire Cycle”; a million “title of your sex tape” jokes … and I really should stop before I simply list every moment from the show’s run.

That run of delight would be enough to make me mourn the loss of “Brooklyn Nine-Nine,” but the credit the series deserves doesn’t end there. In a moment of intense conversation about representation on television, “Brooklyn Nine-Nine” was a model for what pop culture can do when it is committed to showcasing a wider range of characters and their stories.

“Brooklyn Nine-Nine” was not merely diverse in a way that reflected its setting both in the New York Police Department and in Brooklyn. Because it was a show that featured two black cops (Holt and Jeffords), two Latina cops (Melissa Fumero’s Amy Santiago and Stephanie Beatriz’s Rosa Diaz) and two non-straight cops (Holt and Diaz), none of those characters ever had to carry the weight of representing those entire communities. Holt was defined as much by his persnicketiness and sober mien as by his blackness and his gayness; Jeffords by his size, his devotion to his children and his nerdy streak; Santiago by her fondness for rules; Diaz by her air of mystery, her motorcycle and her surprising love of Nancy Meyers movies.

The show could also stage serious debates between characters who shared identities about the best ways to approach dilemmas, as it did in “Moo Moo,” which explored what happened when Jeffords was stopped and frisked by another NYPD officer and Holt disagreed with him about how to respond. And it could explore conflicts between the characters that weren’t related to their identities at all, as the show did with the evolving friendship between Santiago and Diaz.

And while “Brooklyn Nine-Nine” was a comedy about cops, it approached the actual work of policing with seriousness and moral rigor. It was a task that might have doomed a lesser show, especially one that aired during a period when police killings of unarmed black Americans spurred a national movement. “Brooklyn Nine-Nine” tried to model what good policing could look like at a time when even that act of idealism sometimes seemed like a farce.

But “Brooklyn Nine-Nine” by design incorporated a wide range of tensions about policing into its plot and characters. Holt’s marginalization as a black, gay officer was a core motivation for his character and the critical influence on how he ran the precinct. Peralta’s obsession with an earlier era of the NYPD, one defined both by big cases and grotesque civil rights violations, was the flaw he had to grow beyond to become a truly great cop. Showrunner Dan Goor and his writers spent years figuring out the right way for the show to address the NYPD’s stop-and-frisk policies, and the result was one of the best, most carefully calibrated “Brooklyn Nine-Nine” episodes ever.

“Brooklyn Nine-Nine” was never solely an issue show, but its commitment to approaching policing from an ethical place was fundamental to its sense of decency, a quality which was itself fundamental to the series.

Perhaps it’s tempting to use “Brooklyn Nine-Nine”‘s cancellation to rail against the current state of network television, or to proclaim the show simply too good for a wider audience that couldn’t see its worth. But as sad as I am that “Brooklyn Nine-Nine” won’t be back for another season, it’s a measure of the joy the show gave so many of us that mostly what I feel is thankful. I think that’s what Captain Holt would expect from me, anyway.