NBC has picked up Brooklyn Nine-Nine for season six.
A day after the show's cancellation by Fox, show creators and stars tweeted the good news on Saturday.
The show will finish up on Fox with the season five finale before transitioning to its new home.
Show co-creator Dan Goor thanked the fans for their support.
"Thanks in no small part to you, the best fans in the history of the world!" he tweeted.
Missed the best of Kennedy Molloy this week? We've smashed together the best bits in our week in review!