[This story contains spoilers for season four, episode four of USA Network's Mr. Robot, "404 Not Found."]

In the opening minutes of the final season premiere, Mr. Robot creator Sam Esmail announced his deadly intentions for the road ahead, with the death of Angela Moss (Portia Doubleday). If Angela's shocking end wasn't enough of a warning signal about the lethal final string of episodes, then viewers certainly got the big, blue message by the end of "404 Not Found," in which yet another major character met the end of the line: Tyrell Wellick, the original Mr. Robot antagonist played by Martin Wallström.

The shocking death comes at the end of an episode that calls to mind an iconic episode of The Sopranos: "Pine Barrens," in which Paulie Walnuts and cousin Christopher wander through a snowy forest on a quest to finish a hit job gone bad, before ultimately settling on fighting for their own survival. For the USA Network drama's version of events, Rami Malek's Elliot and Christian Slater's Mr. Robot join Wallström's Tyrell as the veritable Paulie and Christopher, stalking through a wintery wood on a mission to find a Dark Army operative who should by all rights be dead — and if they fail in their mission, their own deaths are all but guaranteed.

Over the course of the long Christmas Eve spent in the wilderness, Elliot and Tyrell hear a moaning death knell somewhere from deep within the woods, an ominous sign of what's to come. The two men, who have alternated between being business partners and bitter rivals over the course of the series, finally confront their true feelings for one another, including Tyrell's barely unspoken love for Elliot.

"Here, we get the missing piece of why Tyrell is so in love with Elliot: it's that he just doesn't care," Wallström tells The Hollywood Reporter. "Tyrell doesn't have to be someone for Elliot. Elliot turns out to be almost an idol, someone Tyrell wishes he was, that he didn't have to care about what other people think of him, to fit into this frame that he created for himself and his wife, all of it. Elliot stands for all the freedom that Tyrell really wants."

Moments after the epiphany, Elliot and Tyrell come across the Dark Army operative, who kills himself, but not before fatally shooting Tyrell. Recognizing his own impending demise and the ramifications of what happens if his body is discovered by the Dark Army, Tyrell chooses to walk back into the woods to die alone, buying Elliot some time in his quest against Whiterose (BD Wong). The episode ends with Tyrell stumbling toward a glowing blue light, before the scene fades to white.

From the outside looking in, Tyrell's death comes as a shock on a few different levels. For one, it's only a quarter of the way into the final season; Tyrell has been a central figure in the Mr. Robot mythos from the very beginning, even earning the iconic penultimate line of the pilot: "Bonsoir, Elliot." For another, Tyrell dies just as he was about to be named the new CEO of E Corp — literally, dying one day short of the coveted appointment. But as Esmail explains to THR, Tyrell's inopportune demise was right for the same reason he felt it necessary to kill off Angela: "The story told us when it was time."

"On a script level, this is one of my favorites," says Esmail. "We knew this was [going to be] it for him. We knew he wouldn't be long for this world. But then we started thinking about, 'What does that episode look like?' The way this guy entered our show, it was like he was from Pluto. He was really bizarre and weird in an emotional and pathetic way. We needed to create an episode that leans into who he is as an odd creature that really loves Elliot. Tyrell's relationship with Elliot was the best part of that character. We really wanted to spend an episode with just the two of them, because we had never really done that."

"We needed to construct an episode where we could have those two people finally hash out how they feel about each other, what they think about each other and what they really want out of the worlds and their world views," he continues. "We wanted to see them connect — and then, in Tyrell fashion, we wanted to have a surreal tone to the whole episode. That's why we thought having these two guys go through the woods really felt right: a surreal and existential backdrop of the desolate woods and the cold, with nothing else in sight, and nothing to hear, except for an odd sound they can't quite pinpoint … the howl of death. It just felt so appropriate."

According to Wallström, Tyrell's final episode hit all the right notes: "It was funny, it was sad … it had everything." He also feels it has one surprising component for Tyrell: redemption.

"For him, taking that bullet was one good thing he could do," says Wallström. "The fact that Tyrell and Elliot are all alone in the woods, physically left to each other without any other choice other than continuing on with each other… and as soon as he gets to clear up all of his stuff with Elliot, he finally gets to do something good. Because in a way, he takes the bullet. He's sent off having finally done something good — one good thing after four seasons."

In the context of the Mr. Robot universe, Tyrell's death comes months after the death of his wife Joanna (Stephanie Corneliussen), which led to their newborn son being placed in foster care. Wallström believes Tyrell's decision to die alone is redemptive on the level of protecting the child: "If he survives, he would put his own son in so much danger [from the Dark Army]. So if he can take a bullet for Elliot here, then the best thing for him that can happen now is he can die for his son. It's the only way for him to make things up. It's the only way for him to make sure that the future is somewhat safe."

"He, and maybe all of us, kept running away from trying to not be like his parents," Wallström adds. "Then we realize: 'Well, I am like my parents.' It's complicated. It's not easy to be perfect and everything you wished you wouldn't be, only to suddenly realize, that's what you are. It's all a realization that his own son would probably hate him, too. But that depends on his legacy. The world thinks he's a hero, even though that's not the true story. But maybe it's the best way for him to leave the show, when the legacy is at least somewhere close to where he wanted it to be."

As for the enigmatic nature of Tyrell's final moments, bloodied but bending toward a great blue glow, the actor is just as confused as the viewer: "It wasn't clear to me what that was. Sam and I talked about it, but in my mind, we weren't sure if it's something that only we see, or if it's something that's in his head. When I thought about it, it was so much about coming to peace with everything finally working out. For me, I saw it as him realizing that his son would be okay. It's not the way he planned things, but his son will be okay now, and Elliot will be okay, too — and he'll take down Whiterose. It's a relief for Tyrell. I think he's thinking: 'All of this struggle, it was useless, but it's fine now. I'm going to die now.'"

"When I look back upon these four seasons, we have something like two and a half episodes where he's actually on his way toward achieving his goal, on this upward spiral, and then we have three and three quarters of a season where it's a downward spiral," says Wallström. "The price he had to pay to achieve what he dreamed about was staggering. It was way too high. He's gone through so much — he's been in and out of the show, he was almost caught [after the Five/Nine hack], he was abducted … so much. And now, it just feels natural to me that he had to die. But it was very heartwarming to see that he at least did one thing good in the end."

Follow THR.com/MrRobot for more final season coverage.