NBC has renewed “Brooklyn Nine-Nine” for a seventh season, the network announced Wednesday.

However, this will only be the cop comedy’s second season airing on NBC. The show was infamously canceled at Fox last year, only to be revived at NBC shortly thereafter. Series producer Universal Television had also been in talks with Hulu to keep the series afloat, but the streaming service ultimately passed.

Season 6 debuted in January with seven episodes having aired to date. The show was originally picked up for a 13-episode season but NBC upped that to 18 in September. Season 6 stars Andy Samberg, Andre Braugher, Stephanie Beatriz, Terry Crews, Melissa Fumero, Joe Lo Truglio, Joel McKinnon Miller, Dirk Blocker, and Chelsea Peretti, with Peretti exiting the show in the season’s fourth episode. Dan Goor, Michael Schur, Luke Del Tredici and David Miner are executive producers. Universal Television, Fremulon, Dr. Goor Productions and 3 Arts Entertainment produce.

“It’s been one of our great joys as a network to give ‘Brooklyn Nine-Nine’ a second life,” said Lisa Katz and Tracey Pakosta, Co-Presidents of Scripted Programming, NBC Entertainment. “Cheers to Dan Goor, Mike Schur, Luke Del Tredici and David Miner, and our amazing cast and crew who each week turn New York’s finest into New York’s funniest.”

“Brooklyn Nine-Nine” is averaging a 1.4 rating in adults 18-49 and 3.9 million viewers Live+7, up in both measures from the same point during its last season on Fox. The show is also a strong digital performer for NBC schedule, deriving 45% of its key demo audience from non-linear sources. According to NBC, that is the highest such percentage among NBC shows.

On Tuesday, NBC announced that it had also renewed all three of its “Chicago” shows. The network had previously renewed “The Good Place” and “New Amsterdam” as well.