Here's when Jake (Andy Samberg) planned his surprise proposal to Amy (Melissa Fumero) during Brooklyn Nine-Nine's fifth Halloween Heist. Starting off as competing detectives, the couple had a rocky relationship in the show's first season. It didn't help that Jake didn't miss any opportunity to make fun of Amy. As fans knew eventually though, this was just the detective's way to get her attention as he was attracted to her.

While it was always obvious that Jake and Amy were drawn to each other, it took quite a while for them to start dating for a handful of reasons. First, their budding romance was cut short when Jake was suddenly sent on an undercover job which separated the pair for some time. They also started dating other people which further drew them apart. It was only in Brooklyn Nine-Nine season 3 that they really decided to officially start a romance, and since then, they have been inseparable.

Related: Brooklyn Nine-Nine: Why Rosa Looks Different In Season 4

Given this, the only next obvious step in Jake and Amy relationship was to get married. Due to their respective career paths, the engagement took a little bit longer. Brooklyn Nine-Nine rewarded its loyal fans, however, when it finally happened during season 5's Halloween Heist known as HalloVeen. By this point, both Jake and Amy have been a winner of the annual 99 precinct game, and nothing could stop them from wanting to nab another one. It turns out, Jake was less interested in winning the heist that particular year and more focused on pulling off his surprise proposal to Amy. Using the Halloween Heist's cumberbund, he officially asked his girlfriend in the evidence room to marry him to the surprise of Amy, the rest of the squad, and the fans. Typically, Brooklyn Nine-Nine explains how a major plot twist was pulled off, but not this one, leaving fans wondering when Jake planned his proposal.

From the looks of it, he didn't get any help from the people at the precinct. Charles (Joe Lo Truglio), Jake's best friend, was unaware of the proposal until he walked in on them after Amy said yes, while the rest of the squad was absorbed with wanting to win that year's Halloween Heist. This made pulling the whole surprise off much more difficult, meaning Jake had to plan his elaborate ploy way ahead. While Brooklyn Nine-Nine didn't show him scheming, he did say when he started plotting the surprise. At the beginning of the heist, he told everyone that the only thing that kept him sane during his time in prison was planning for the Halloween Heist — which was really his proposal to Amy. What's more interesting is that before the game started, Amy declared that Jake can't do anything to surprise her. Jake didn't flinch or give any indication that in several hours, she would be proven wrong.

Jake was locked up for almost a year after he and Rosa (Stephanie Beatriz) were framed for the series of bank robberies in the cities at the end of Brooklyn Nine-Nine season 4. Early on during serving his sentence, he was in protected custody, but was eventually transferred into the main prison and even in solitary confinement. With not much to do, it gave him the time he needed to plan every single detail of his proposal to Amy — no wonder everything went according to plan.

More: Brooklyn 99: Why Captain Holt Got Demoted In Season 6