A day after Fox cancelled Brooklyn Nine-Nine, the praised cop comedy series has been picked up by NBC for a 13-episode sixth season.

NBC, whose sister studio Universal TV produces the Andy Samberg-starring series, was one of the potential suitors for the comedy after its cancellation. NBC also was among the broadcast networks that bid for the Brooklyn Nine-Nine pitch from creators Mike Schur and Dan Goor when it hit the marketplace in 2012 before the project landed at Fox in a very competitive situation.

“Ever since we sold this show to Fox I’ve regretted letting it get away, and it’s high time it came back to its rightful home,” said Robert Greenblatt, Chairman, NBC Entertainment. “Mike Schur, Dan Goor, and Andy Samberg grew up on NBC and we’re all thrilled that one of the smartest, funniest, and best cast comedies in a long time will take its place in our comedy line-up. I speak for everyone at NBC, here’s to the Nine-Nine!”

NBC

NBC’s pickup of Brooklyn Nine-Nine follows 32 hours of groundswell of support for the show on social media the magnitude of which we have rarely seen, with regular fans — joined by celebrity ones like Lin-Manuel Miranda, Guillermo del Toro, Seth Meyers and Mark Hamill — rallying behind it. Acknowledging the big role fans’ social media campaign played in the show’s resurrection, Brooklyn Nine-Nine‘s creators and stars announced the NBC pickup directly to them on Twitter. (you can see some of their posts below).

Created by the Parks and Recreation duo of Dan Goor and Michael Schur, who are former college roommates, Brooklyn Nine-Nine centers on Peralta, played by Saturday Night Live alum Samberg, a screwball who happens to be a real good cop. His captain in the NYPD’s 99th Precinct is Raymond Holt, a seen-it-all and emotion-challenged captain played by Andre Braugher, who scored three consecutive Emmy noms for Supporting Actor from 2014-2016. Terry Crews, Melissa Fumero, Joe Lo Truglio, Stephanie Beatriz, Chelsea Peretti, Joel McKinnon Miller and Dirk Blocker also star.

Brooklyn Nine-Nine, which was Fox’s highest-rated live-action comedy series this season among adults 18-49, is produced by Universal Television, Fremulon, Dr. Goor Productions and 3 Arts. Goor and Schur executive produce alongside David Miner and Luke Del Tredici. The show won two Golden Globes in its freshman season — for best comedy series and best actor in a comedy series (Samberg).

NBC is not the first broadcast network that has come to the rescue of a series produced by its sister studio. In a similar way, ABC and CBS picked up ABC Studios-produced Scrubs and CBS Studios-produced Medium, respectively, after their cancellations by NBC. Like them,  Brooklyn Nine-Nine has off-network/SVOD deals that make prolonging their run good business for the parent company. For Fox, which didn’t own Brooklyn Nine-Nine, it was expensive, with a license fee said to be around $1.9 an episode.

NBC’s pickup of Brooklyn Nine-Nine brings the number of Schur series on the network to three — he also has The Good Place, which was renewed for a third season and the newly picked up comedy Abby’s.