Fans of Brooklyn Nine-Nine can rejoice as the series which was due to be cancelled is no longer being shelved. 

Fox shocked fans of the series, which is based in and around New York police station, when they decided to cancel the comedy. However, NBC has stepped in and decided to take it under its wing with many sighting a strong social media campaign as its reason for doing so. 

The 13-episode sixth season will be coming to screens next year. This comes int the wake of fans launching a Twitter campaign, using the hashtag #Brooklyn99. This hashtag was tweeted around 600,000 times, which shows the love that people have for the show. 

There were plenty of celebs involved in the campaign too, with Backstreet Boys and director Guillermo del Toro lending their weight to calls for the series to continue. 

Del Toro tweeted: "Brooklyn Nine-Nine has given us fully human characters, beautiful, powerful, flawed, vulnerable, majestic... In whichever form, B99 must return. It will. 

The Hellboy director added that he is hoping that the show's audience grows, adding: "And I will be there to watch. And, it is my hope that I hope that, this time, a lot more people do too."

The series' writers and actors took to social media to celebrate the news. They credited the show's fans for NBC's decision. 

Actress Melissa Fumero, who plays Amy Santiago, posted celebration gifs from the show, while Stephanie Beatriz, who plays as Rosa Diaz, thanked the series' loyal fanbase. 

Nine-Nine creator Dan Goor added: "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!!!!!!!!!"

Fumero wrote: "#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!!!!!"

Stephanie Beatriz added: "SQUAD YOU DID IT #BROOKLYN99 WILL BE ON NBC FOR OUR 6th SEASON!"

In a statement, NBC Entertainment's Chairman Robert Greenblatt said: "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."

It is thought that both Netflix and Hulu were in the running to take up the reigns of the show, but NBC won out in the end. 

The season finale for series five will air on May 20th in the US.