SPOILER ALERT: Do not read if you have not yet watched the fourth season of “Search Party,” streaming now on HBO Max.

As “Search Party” creators and executive producers Sarah-Violet Bliss and Charles Rogers worked on evolving their dark comedy season over season, they always wanted to find a new way to focus on how “fractured and extreme” some people’s psyches can be, as Rogers puts it.

Starting with Dory’s (Alia Shawkat) wishful thinking that she could play detective and save a missing friend in the first season, the writer-producer duo kept seeding denial into the story, digging their main character into deeper and darker trouble as time went on. She ended up committing two murders and standing trial, vehemently denying her guilt all the way through and ultimately becoming the one who needed to be saved — from herself, sure, but also in the fourth season from being kidnapped and held captive in a basement by Chip (Cole Escola). By the end of the fourth season, Dory died and came back to life, and that was the journey she needed to go on to actually experience a true epiphany and moment of growth. But her journey may not end here.

Related Stories

The fourth season of “Search Party” was not written and produced to be a final season, and a fifth season is currently being considered at HBO Max, the creators tell Variety.

Popular on Variety

“We always paint ourselves into a big corner every season. We swing for the fence with a big cliffhanger and then we pray we get another season,” says Rogers.

Still, this ending was “definitely the hardest ending of any of ours to figure out,” he continues. “We are leaving off on a very, ‘Oh my god, what does this mean?’ energy, but we talked a lot about enlightenment. We pitched the title card to be white this season to reflect that feeling. We tossed around a lot of different ideas about Dory having an epiphany, and it just so happened that in also thinking about her dying at the end of the season we also found a way to mix those two notions together. Possibly in death is the only way that you can integrate all aspects of your psyche in this very definitive, archetypal way. It was a new way to say that she had fully self-actualized.”

After a season spent held captive and being brainwashed by Chip, Dory finally admitted she wanted to escape herself and that she didn’t like who she had become. Unfortunately for her, that confession to Chip came after his aunt Lylah (Susan Sarandon) was already called in to fix his mess. Dory ended up locked in the basement while Lylah hired some local teens to set fire to the house. As Dory lay on the floor, inhaling smoke, the different versions of her from the past few years came together as one inside her mind. Then, when she was pulled out of the house on a gurney, she woke up, coughing and exclaiming that she “saw everything” after she died.

“The Dory that we knew in Season 3 would not admit to anything, and so what do you have to do to a person like that, who’s so steeped in denial that it’s essentially a shade of a personality disorder — what do you have to do to them to get them to be totally 180ed? This season was going to have to be based around all of the things that you’d have to do to that person to finally break them down to the point where they don’t want to be themselves,” Rogers says. “Going into this season we knew that some people felt that Dory’s journey into darkness made her less and less relatable as a main character, which wasn’t something we were scared of, but it was something to be mindful of because in torturing her and in holding her captive and in making her have to experience life or death experiences, the audience would be oriented in her point of view and root for her in a new way.”

Dory’s exclamation at the end of the season does not mean her issues are magically cured, says Bliss, but that “you can’t continue to go down denial again; you don’t want to replay the same part over and over again. So it’s evolving; she’s evolving.”

That evolution started when Chip first locked her in the basement of Aunt Lylah’s house in the small town of Babyfoot. In that basement he recreated her New York City apartment, but on a smaller scale, and he was determined to make her be his best friend. At first she fought to be freed from her captivity, but his odd combination of psychological tricks and tools actually reprogrammed her to believe she was someone else — a woman named Stephanie. For this, Rogers and Bliss share they spent a lot of time learning about the ways in which cults and other psychologically abusive systems work in order to work some of those dynamics into the scripts. But they were also mindful to make sure “that Chip’s character had aspects to his psychosis that were fun and ‘Search Party’-esque, rather than making him just a beacon of darkness,” says Bliss.

They also wanted to make sure to balance the season’s 10 episodes so that Dory didn’t spend too much time in her Stephanie state. As much as they often thought they wanted to see Shawkat in more of Aunt Lylah’s clothes, Bliss laughs, they realized the longer she was Stephanie, the more viewers would start to question her behavior.

“[They] are going to want her to be tricking Chip and feel like, ‘Oh wait, is she or isn’t she?’ And we didn’t necessarily want to play with that because we liked the irony that when Dory was brainwashed she actually felt like she liked herself better than when she was herself and that that was going to be the perverse takeaway,” says Rogers.

To balance Dory’s heavy and emotional storyline this season was some lighter fare with her friends. Drew (John Reynolds) found solace playing a costumed character at a theme park; Elliott (John Early) finally found fame, or at least notoriety, playing the role of a right-wing anchor; and Portia (Meredith Hagner) finally got her starring role, cast as Dory in the film about their lives, although she was eventually recast with Selena Gomez.

“The way we write ‘Search Party’ is always trying to balance the levity and the big turning points. This season was particularly hard doing that because Dory and the friends were separated and Dory was specifically going through hell, [but] in that way, we could give Dory the hell and the friends a little bit more of the fun stuff,” says Bliss.

The trio ultimately realized their friend was missing and began a search for her that often intentionally paralleled the search they all embarked upon together in the first season, and they also came to some realizations about themselves that mirrored Dory’s epiphany.

“The friends and what they reflect is always a way to support or counterpoint Dory’s plight and so in that regard, if there was another season, it would be around this topic of what it would be like to be on the other side of death and to have had an epiphany,” says Rogers. “What they experienced on the street in Babyfoot [when they] all admit they don’t know who they are, which is also what Dory goes through, I think that refers to being truthful to yourself. And so, in that regard, I think that this is the first step for them in a more truthful journey of self-realization.”

The finale episode saw Dory’s friends paying tribute to her with eulogies and songs at a memorial service. Elliott’s speech about Dory being exceptional at being unlikeable even offered a “wink” to audience members who have commented on the characters being awful, Bliss points out. After that memorial, they were met with a box of Dory’s things, which included a threat from Chip and a video message from Dory herself saying goodbye. They spent some time crying over their friend but also imagining a superficial alternative future where they’re all wealthy and thriving in relationships, without realizing that Dory actually survived the house fire after all.

“We knew we wanted there to be some kind of really big emotional catharsis at the end,” says Rogers. “Even though the very end does open up the possibility for a whole new avenue to go down with story, also we can look back and see, ‘Oh there was such a reflective aspect to this season, it could feel like closure on some level for the audience.'”

More from Variety