Proving one network’s cancellation is another network’s pickup: NBC has revived the recently canceled “Brooklyn Nine-Nine.”

A day after Fox gave the boot to the cop comedy — causing an uproar on Twitter — the peacock network scooped up the Andy Samberg-led half-hour for a 13-episode sixth season.

Not long after news broke that Fox had canned the series, both “Brooklyn Nine-Nine” and “Brooklyn 99” started trending on Twitter, with fans and the show’s stars — including Melissa Fumero, Stephanie Beatriz and Joe Lo Truglio — mourning the show’s loss. Even Lin-Manuel Miranda and Mark Hamill got in on the action.

Hey everyone, just wanted to say no big deal but....

NBC JUST PICKED #BROOKLYN99 UP FOR SEASON 6!!!

Thanks in no small part to you, the best fans in the history of the world!



Nine-nine!!!!!!!!! — Dan Goor (@djgoor) May 12, 2018


It wasn’t long before talk began to spread that the show, which is produced by Universal Television, was being shopped around to other outlets, including Hulu and TBS. Its new home base keeps the show firmly in the NBC family — Universal Television is the studio arm of the network.

The Mike Schur and Dan Goor comedy will be in good company. NBC is also home to Schur’s “The Good Place,” and will soon be home to the producer’s new comedy “Abby’s.”

#Brooklyn99 IS COMING BACK FOR SEASON 6 YOU GUYS ON NBC!!!!! You did this!! You got loud and you were heard and you saved our show!! Thank you!! Thank you to NBC!! NINE NINE!!!!! pic.twitter.com/cTycfF4FoR — Melissa Fumero (@melissafumero) May 12, 2018

“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,” NBC Entertainment boss Robert Greenblatt said in a statement. “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!”


The most-read Entertainment stories this hour »

yvonne.villarreal@latimes.com

Twitter: @villarrealy