[This story contains spoilers for the final season premiere of USA Network's Mr. Robot.]

Goodbye friend, indeed. The final season premiere of Mr. Robot wastes no time establishing the stakes of the year, by killing one of creator Sam Esmail's single most important characters: Angela Moss (Portia Doubleday), childhood friend of Elliot Alderson (Rami Malek).

A mainstay since the pilot, Angela's death launches the final season into action, serving as the very first scene of the premiere. It continues Angela's final appearance in season three, in which she sits in the idyllic front yard of a lavish manor alongside "Evil Corp" head honcho Phillip Price (Michael Cristofer). Price takes a page from Darth Vader's playbook by announcing himself as Angela's biological father; the news lands poorly, as a distraught Angela is too busy reeling from her role in a series of terrorist bombings that killed thousands of people across the United States.

The premiere continues their short-lived family reunion, as Angela declares her intent to challenge the villainous Whiterose (BD Wong) and take over her life's work: an enigmatic machine lurking beneath the surface of Washington Township, New Jersey, potentially capable of building an alternate universe of sorts. It turns out Price is wearing a wire; Whiterose has heard everything, and has had two Dark Army agents on standby throughout the entire conversation. Price begs Angela to back down from her defiant plans, in order to evade what's otherwise an inevitable and immediate death. Angela, who has firsthand knowledge of Whiterose's plans (knowledge still withheld from the audience, of course), refuses his plea.

"You're panicking," she tells her increasingly fearful father, echoing words he once said to her long ago. "Remove all emotion from this, and you'll do just fine."

With that, Angela takes a deep breath, turns from her father and accepts her fate. "You should probably leave," she tells Price. He complies and walks away, as the Dark Army assassins stroll right up to Angela and place a bullet in her head.

Creator Sam Esmail sat down with The Hollywood Reporter to discuss the shocking death of Angela Moss and much more from the final season premiere, in a special edition of the Series Regular podcast. Hear the full conversation in the player, and continue reading for more of Esmail's thoughts on the episode.

According to Esmail, Angela's death wasn't necessarily always in the cards; in fact, it was a plan that came to the surface once he and his writers examined where they left the character in season three.

"With character deaths, a couple are pre-planned, but for most of them we find our way," he tells THR. "It's what happened with Joanna (Stephanie Corneliussen) in season three. We start pitching out the storyline, and then we figure out the organic end to the characters. Does it start to get ridiculous if these characters continue living on if the threats and stakes on them are so high? With Angela's character, any sort of capitulation felt like a betrayal to who she was and what she represented in the first three seasons. Unless we pulled punches, there was no way Whiterose was going to let her continue living and going out in the wild to figure out the machine with what Whiterose had divulged to her. We felt that if we were being honest, it was the only end to her character."

"Before we even talked about this as the final season," Esmail continues, "we knew we had to continue that scene from the third season finale [in which Price reveals he's Angela's father]. It was after that where we took a step back and said, 'Wow.' We were all shocked. We love this character. Opening on that was so heartbreaking. We were also pissed off at ourselves. We kept asking: 'Is there a way we can save her?' And we couldn't."

Not that he and his team didn't try, of course.

"You do this thing in the writers' room where you box yourself into a corner and say, 'Ah, we'll get out of it next season,'" he says. "We came up with ridiculous ways to get out of the situation. We tried to jump through some hoops. She went to Kansas at one point and went into hiding in the witness protection program. But we felt we were avoiding the inevitable. It also made Angela into a runner. Going into hiding felt like a betrayal of who she was. She always stood for her principles, even when she was in these precarious positions. She always stood for what she believed in. That's ultimately what drove us to begin the season with that scene, and to continue on with it. We also thought with Price, there was no way that with his relationship to Whiterose and how he's under her thumb, that there was any way for him to protect Angela anymore. We also didn't like the idea of Angela needing Price to protect her. It was a confluence of things that made us have to be honest with our characters and honest with our storytelling."

According to Esmail, the final two episodes of Mr. Robot will play out very faithfully to his original vision of the story as a feature film. But it was Angela's death scene that formed the spine of season four as the final Robot ride: "We knew this was the way to open [the season] … and then the question becomes, what happens after? That's when we decided to do the time jump to Christmas, and that's when we thought about this as the final season. Elliot has gone through so much. He's lost so many people. He's lost his whole entire hacker group. But to lose Angela? To lose the closest person he's ever known? There's no turning back for him after that point. He was going to strike back, hard. That's what accelerates the standoff between Elliot and Whiterose that we've been waiting for. It has to start now."

Beyond how it impacts characters in the Mr. Robot universe, there's the matter of how Angela's death impacts viewers in the Mr. Robot audience: namely, it creates a tense reason for fans to root for the otherwise nefarious Whiterose's Washington Township project — whatever it may be — if it means bringing beloved characters like Angela back from the dead.

"Anytime you can get the audience to actually root for the villain's goal is really fascinating," says Esmail. "It's one of the reasons why Se7en is one of my favorite films. By the end of the film, the villain is asking [the hero] to kill him, and if that happens, he wins. Now you're rooting for him and against him at the same time. I always find putting the audience in that position really interesting and really engaging. You tend to want to lean in more. You're so conflicted that it makes you engage on multiple levels. Not just an emotional level, but an intellectual level. When you have the audience there, then you can start to play with expectations from episode to episode. That wasn't the driving force of the decision, it always came down to her character. But when we saw the benefits of all of that ... also in terms of withholding the information, maintaining the suspense and keeping it a mystery? It made complete sense." Following Angela's death, the premiere leaps forward into the future, roughly two months, landing right in the thick of the Christmas season. Esmail credits the great British television tradition of holiday specials for the festive spirit covering the final season of Robot. For his part, Elliot doesn't have much time for the merry-merry of it all; he's running against a clock of his own, as he's signed on to help Whiterose ferry her precious project out of America and into the Congo — but once the project ships, Elliot's protection wears off, and he and everyone he loves (the few who remain alive) will be in the crosshairs of the Dark Army. The result: Rami Malek and Christian Slater's two sides of Elliot working more fiercely together than ever before. "I sound like a broken record when I say this, but I really mean it: this story has been about following Elliot's emotional journey," says Esmail. "The dynamic between Mr. Robot and Elliot — the dissociative identity disorder that he has — we never wanted it to play as a gimmick. It's crucial to who he is and what his emotional journey is. Elliot and Mr. Robot are not two different people. They are one and the same. There is a piece of Elliot in Mr. Robot, and vice versa. There has to be. They're two minds of the same person. When we talked about how he's arcing across these four seasons, we knew we would get Elliot to a place where you got to see a bit of Mr. Robot in him — and now you also get to see the bit of Elliot in Mr. Robot." "I always said that the key word for season three was 'disintegration,'" he continues. "This season is about integration. It's the coming together of these two guys. At first, Elliot was in the dark. In the second season, Elliot and Robot went to battle with each other. The third season, they were both in the dark. Here, they're finally coming together. With that coming together, we're seeing an overlap not only in who they are and their personalities, but in how they feel about the world. We start to see that anger that caused the split, that caused the DID in the beginning, come through Elliot, and not just through Mr. Robot." In that spirit, Elliot and Robot actually overlap by exchanging certain responsibilities; for example, Slater's Robot provides voiceover throughout the season four premiere, taking on the narrator role that Malek's Elliot typically occupies. "If Elliot's so hyper-focused — and we wanted him to be, because of what happened to Angela, and now because all bets are off and there's a time limit on his own life — he was going to shut us out," says Esmail. "So, who brings us in? It's a great way to switch up the dynamic, and to reflect honestly what's going on in Elliot emotionally. Robot now becomes the softy in this scenario. He's now trying to include us." Speaking of inclusion, the final Robot premiere draws some family friends into the mix in the form of cameos both subtle and overt: composer Mac Quayle plays a keytar at Grand Central as Elliot coaches Jake Busey's Freddy through the station; Shameless veteran (and Esmail's spouse) Emmy Rossum appears briefly to sing some Christmas carols; and even Esmail himself shows up as a shadow agent, injecting Elliot with a lethal dose of heroin that seemingly — emphasis on seemingly — kills the computer-hacking hero. "I remember thinking, what a critical line: 'Goodbye, friend,'" Esmail says about his episode-closing cameo, in which he subverts the drama's iconic "hello, friend" tagline. "It felt weird to give it to somebody I was going to just cast for that one scene. I always try to find a way to slip my cameo in every season, so this just felt right. But I have to tell you, when we were shooting it? I started to get very worried. I had two words to say! One line! I think I did 30 takes. Rami was directing me. I was terrible. I'm not ashamed to admit it. I blinked a lot, which apparently is a big no-no when it comes to acting. All of this, I learned from Rami. Rami Malek, by the way? Great filmmaker. Great director. He gave me great notes, and he held my hand through it." As Mr. Robot barrels forward into its twelve remaining hours, there may be someone holding Elliot's hand for the next little while: Phillip Price, Angela's biological father, who shows up at the end of the premiere to restore Elliot back to health. Expect much more from this unlikely duo (or is it trio, with Robot in the mix?) as Esmail brings his thriller to a close. "The episode opens with Price being forced to let his daughter get killed," he says. "Here we are at the end, and he's rescuing Elliot, his daughter's best friend. What I want to leave you with is this: 'Here we go. The troops are banding together.' I don't want to spoil too much, but hopefully you'll enjoy how they go after Whiterose."

Follow THR.com/MrRobot for more coverage.