[Editor's note: The following contains spoilers through the Season 8 finale of Brooklyn Nine-Nine, "The Last Day."]

The final episode of Brooklyn Nine-Nine offered up exactly the sort of loving goodbye that fans were hoping for, reuniting the squad (including the surprise return of Chelsea Peretti as Gina Linetti) for one last hilarious heist. But for those who like to make a study of series finales, it also offered up not just a series of jokes and callbacks specifically tailored to please the show's loyal fanbase, but was also remarkably subversive in how it approached the very nature of final episodes, and the sometimes elaborate plotting hijinks involved in delivering happy endings on a tight timetable.

The main plotline, focusing on Jake (Andy Samberg) plotting his perfect goodbye to his co-workers after deciding to leave the force to take care of his and Amy's (Melissa Fumero) son, was rightly played relatively straight. Not only did it give the final heist (or so we thought) some real emotional resonance, it also led to a real gutpunch of feels, with Captain Holt (Andre Braugher) praising Jake for growing up into the kind of detective/person that he'd be proud to call a son.

But while Jake's decision to leave behind the force for the sake of his family stayed relatively earnest, "The Last Day" had its fun in not just delivering some extremely meta jokes, like explaining the backstory behind the opening credits' iconic shot of the squad walking in a line by the Brooklyn Bridge (there's a really good falafel place nearby) but using the character of Rosa (Stephanie Beatriz) to poke fun at a series finale trope that more often than not ends up compromising the final installments of other shows.

RELATED: How the 'Brooklyn Nine-Nine' Season 8 Premiere Took On Police Reform and Black Lives Matter

Rosa's personal life (much to her dismay, especially at the beginning) was explored a fair amount over the course of the series, with her multi-episode relationship with wild card Detective Pimento (Jason Mantzoukas) followed by her coming out as bisexual to both her co-workers and her parents, a process which was not smooth sailing. While viewers hadn't gotten many updates on her recent relationships over the course of this season, that was understandable given everything else going on, like the squad's successful effort to enact police reform from within the system. Still, as the only unmarried one left as part of the Brooklyn Nine-Nine family, it was easy to believe that "The Last Day" would include some sort of last-minute romantic resolution for the character — much like, as just one example, Peggy (Elisabeth Moss) and Stan (Jay R. Ferguson) in the series finale of Mad Men — which made it all the more suspicious when, in the finale, Pimento appeared mid-heist.

Stephanie Beatriz in Brooklyn Nine-Nine
Image via NBC

While the number one rule of a Nine-Nine heist is to assume that literally everyone is lying, the aforementioned series finale trope meant that when Rosa confessed to Amy that she was considering getting back together with Pimento, it seemed plausible. But said trope was also why it was so satisfying when the episode revealed that Rosa had been manipulating Amy's assumptions to score another advantage in the game. "You all think for someone to be happy their story has to end with marriage and kids," she says, before — in a later scene — teasing Amy with the news that she's planning to move in with her girlfriend, then revealing that she was once again messing with her friend, because "I don't want to settle down."

As meaningful as the final scene with Holt and Jake was, there was something equally powerful about Rosa proudly proclaiming that being in a committed relationship wasn't essential to her happiness: she has friends and work that satisfies her and doesn't need a partner in order to feel whole. Not only was it the sort of important statement that so often isn't emphasized in stories like this, but it was also a real tribute to the character, one of the show's most important not because of how she slowly opened up over the years, but because her evolution never came at the cost of the factors which made her so indelibly herself.

All that, and we got another Raymond Holt balloon arch. Brooklyn Nine-Nine will be missed, but it ended on a high note.

Brooklyn Nine-Nine is streaming now on Hulu and Peacock.

KEEP READING: ‘Brooklyn Nine-Nine’ Season 2 Blooper Reel Even Makes Captain Holt Laugh Out Loud