[Warning: This article contains spoilers from Monday's episode of The Following. Read at your own risk!]

Joe Carroll is out - and Ryan Hardy 2.0 is in.

After escaping death too many times to count over the course of two and a half seasons, Joe Carroll (James Purefoy) finally met his maker on Monday's episode of The Following.

But that doesn't mean he's gone for good. As fans saw at the end of the hour, Joe Carroll will continue to play a role in Ryan Hardy's (Kevin Bacon) life - even if it's one that isn't grounded in reality.

"When Ryan let Joe back into his life, it was almost like letting a virus or infection back in," executive producer Brett Mahoney tells TVGuide.com. "It's really about the place that Joe occupies in Ryan's mind, and Ryan has got to find a way to exorcise that out. That'll be his process in the last five episodes of the season."

Finale Preview: Get scoop on The Following and 38 more season-enders

Of course, Joe's execution doesn't go off without a hitch. To recap:

First, Joe engineers a hostage situation using the shank he fashioned out of sunglasses in last week's episode. Then, after negotiating a visit from Ryan, Joe coerces his "most devoted follower" into admitting that he dreams about Joe teaching him how to kill - and that, like Joe, Ryan feels a sense of satisfaction and power after killing.

Placated by Ryan's confession, Joe surrenders to Ryan and says he can die in peace now that he has confirmation that he and Ryan are similar. But as Ryan is escorting Joe down death row, Theo (Michael Ealy), who's been following the story on the news, overrides the prison's computer system remotely, unlocking the cell doors and allowing the inmates to quite literally take over the asylum.

Then things get really dicey, but Ryan saves the day, killing at least two of the inmates and rescuing Joe's lawyer from a near-rape in the process. And in the end, Ryan actually saves Joe's life by pulling a third vindictive prisoner off of him (after a few moments' hesitation).

TV's most unexpected deaths

However, it's clear Ryan is a changed man. After he saves Joe's lawyer from assault and tells her she's safe, she looks just as frightened of Ryan as she did of her attacker. And when Ryan finally reunites with Max (Jessica Stroup) and Mike (Shawn Ashmore), his reassurances that everything's fine are hollow and unconvincing. Even Joe notices that there's something different about his captor, and is more convinced than ever that his legacy will live on through Ryan. Perhaps in exchange for this, he gives Ryan a parting gift - a tip that Theo was borne out of violence in Philadelphia.

And then it's the moment we've all been waiting for. After the violence and gotcha moments that have become commonplace on The Following, Joe's death scene is notably understated and nearly silent (save for some gasping after his final words, which come courtesy of Edgar Allen Poe: "Quoth the Raven, Nevermore").

After he's executed, Ryan heads straight to a bar, where he orders two shots of whiskey from a flirtatious bartender, ignores a call from Gwen (Zuleikha Robinson), and drinks a toast to Joe - whom he hallucinates is sitting on the stool next to him. Oh boy.

It remains to be seen whether Ryan will snap out of it by the end of the season, or whether we're witnessing the birth of a sinister version of the FBI agent. (TVGuide.com has learned that Purefoy will continue to appear in at least the next few episodes as part of flashbacks and hallucinations.)

"We definitely end with a new trajectory that would take us forward into the next season in a very interesting way," Mahoney teases.

What did you think, Following fans? Are you shocked that Joe Carroll is dead? Is Ryan Hardy going to turn evil? And can the show continue without a (non-imaginary) Ryan/Joe dynamic? Sound off in the comments!

VIDEO: TV's most heartbreaking deaths