NBC has closed the book on “Community,” canceling the Sony Pictures TV comedy after five seasons of underwhelming ratings, even with the rabid fan base the show has fostered via social media.

Sony TV is likely to shop the series to other outlets. The show’s hard-core fan base seems tailor-made for content-hungry digital outlets like Amazon, Netflix and Hulu, who are less sensitive to the mass audience ratings demanded by a broadcast network.

Sony Pictures TV declined comment on the cancellation or plans to find a new home for the show.

Hulu already has digital rerun rights to “Community,” which would probably complicate a deal for new episodes on a rival service. Sony owns the Crackle comedy-centric Internet vid site which could be a logical fit. Comedy Central carries “Community” repeats for linear TV.

“Community” creator Dan Harmon has become a social media folk hero in some quarters for his unvarnished musings on Twitter and other platforms and the Harmontown podcast he has produced independently of the show since 2011. A documentary of his “Harmontown” club tour staged during his exile from “Community” in the 2012-13 season, is just hitting the festival circuit.

Harmon has had rocky relations with NBC and Sony TV in the past — he was fired from the show at the close of its third season — but he returned to the fold for season five. Still, “Community” never caught fire for NBC in a way that justified its renewal at a time when the Peacock is doing a top-to-bottom makeover of its comedy profile.

This time last year when the show was on the fence for renewal, it was no secret that Sony TV was approached by other outlets about a pickup should NBC pull the plug. In addition to the digital contenders, plenty of cablers might well make a play for the niche aud that would surely follow the show to a new home.

“Community” at times amounts to a half-hour rendition of theater of the absurd. Joel McHale leads an ensemble of misfits who initially meet in a study group at a community college. Chevy Chase was a cast member for its first four seasons. He had much-publicized battles with Harmon behind the scenes and left as the showrunner returned for season five.

Danny Pudi, Alison Brie, Yvette Nicole Brown, Gillian Jacobs, Ken Jeong and Donald Glover also star.

McHale acknowledged the news from NBC in a tweet Friday shortly after the ax fell.