SPOILER ALERT: Do not read if you have not yet watched the 99th episode of “Brooklyn Nine-Nine,” entitled “99.”

Fox’s cop comedy “Brooklyn Nine-Nine” hit a major milestone Tuesday night, reaching its 99th episode with “99.” The episode took a break from Jake (Andy Samberg) and Amy’s (Melissa Fumero) wedding planning after Nov. 21’s “Two Turkeys” saw the two attempting to unite their parents for Thanksgiving, and instead took the show back to its roots by focusing on the Jake-Holt (Andre Braugher) dynamic and how the squad works best as a team.

Additionally, though, Rosa (Stephanie Beatriz) experienced some major character development — especially considering how much she normally avoids change — by coming out as bisexual to Charles (Joe Lo Truglio) after he pressed her about her dating life post-Adrian Pimento (Jason Mantzoukas).

“That idea was definitely generated by the real life fact that [Beatriz] came out recently as bisexual,” series executive producer Dan Goor tells Variety. “It felt like an interesting journey for the character to take as well, and a story we were really excited to tackle.”

Beatriz notes that when the writers approached her with the idea, she jumped at the chance to offer teenagers and young adults a positive example of a bisexual character.

I was so excited about it because as somebody who identifies as bi — queer — I just had nothing like that when I was growing up,” she explains. “The gay characters I can remember were most often stereotypes. Even a show like ‘Friends,’ you watch back, and you’re like, ‘Ooh, I can’t believe that’s the choice they made.’ And as someone who’s bi, you have absolutely nothing — no representation at all. And to be able to try to do something like that on our show and have a character come out as bi was really important for me.”

Goor agrees that bisexuality is still underrepresented in media and feels it is important to note that coming out as bisexual is often very different than coming out as gay. When constructing the story for “Brooklyn Nine-Nine,” his writers’ room wanted to be “specific and reflective of that fact.”

For Beatriz, it is also important to portray a character who is confident in her sexuality, so that the depiction of bisexuality is not brushed off as just a phase, with the character expecting to “pick a team,” a phrase Beatriz says she hates.

“If a kid that’s bi is watching TV and doesn’t really see anyone that identifies as bi or queer that is in a happy, functioning relationship, that has a good job, that lives past a 3-episode guest star arc — or maybe the bi character is hypersexualized or possibly a villain, [which] happens a lot — what does that mean for a 12, 13-year-old watching television and consuming media, and thinking, ‘Well who am I then? I guess I’m not this thing because I’m not a villain, I don’t want to be hypersexualized, I want what everybody wants, to live happy and well,'” she says.

Coming out was especially difficult for Rosa because she is a character who prefers to control how people view her, which can “shift in a matter of seconds if you tell them something personal and important, like your sexuality or your sexual orientation,” Beatriz notes. But Beatriz also shares that Rosa, as one of the characters who’s experienced less personal growth than the other characters (“Charles adopted a kid; Terry has not two kids, but three; Jake and Amy are engaged; Gina just had a baby,” she points out) finally made the decision to let her friends in. 

Rosa got to a place in her mind where she was like, ‘I might have a relationship with a woman or I might have a relationship with a man in my future. And maybe I want to let in to that decision the people that I really care about and love,'” Beatriz explains. 

Goor says that the writers are likely to have Rosa continue to date around for a while, rather than show her settling down with a new significant other right away. He adds that the timing of Rosa coming out in the 99th episode was important because while the writers knew they wanted to do it in the first half of the year, they also wanted to make sure they cleaned up loose story ends such as her time in prison and her relationship with Pimento. But the fact that there would be “extra eyes” on the milestone 99th episode was not taken lightly, either.

It’s a significant episode. We thought the 99th episode gave it some weight and we also thought telling this story would give the 99th episode some weight, so it was some mutually beneficial situation,” Goor says.

“Brooklyn Nine-Nine” airs Tuesdays at 9:30 p.m. on Fox.