The following contains spoilers for Titans Season 4, Episode 5, "Inside Man," now streaming on HBO Max.

For the past several episodes of Titans, the heroes have done their best to keep Sebastian Sanger free from the grasp of a deadly cult led by the wicked Mother Mayhem. After a harrowing battle against an undead army raised by Mayhem, the Titans were able to escape and regroup back in Metropolis -- but Conner Kent was grievously injured in the process. And with Mayhem tapping deeper into her paranormal abilities to track down Sebastian, the Titans are about to witness the full extent of her insidious powers firsthand.

As Rachel and Sebastian commiserate over their surprising connection as siblings in the S.T.A.R. Labs safe house, the magical knife wound Conner endured has become infected and continues to affect his personality. A large snake infiltrates the safe house and nearly kills Tim Drake and Bernard Dowd, with Jinx deducing it’s a magical serpent commanded by Mother Mayhem. The Titans break up to search for the snake throughout the lab, with Conner left behind to guard Rachel and Sebastian from the sinister cult.

RELATED: Titans Might Be Looking To Introduce John Constantine After All

titans s4e5 nightwing

The possessed Conner tries to take Sebastian with him out of S.T.A.R. Labs but after Dick Grayson and Kory Anders see through the deception, Jinx is able to subdue Conner through Superboy's magical vulnerability. The Titans restrain Conner in S.T.A.R. Labs and search for a way to restore him to normal -- only to learn that he carries the cursed serpent inside of him, with Jinx unsure if she can purge it. Kory leads Rachel and Sebastian on the road to get the latter away from Conner. She receives another message from her Tamaran trainer reminding her of her royal destiny from the other end of the cosmos.

Gar decides to tap into his animalistic powers like never before, transforming into a virus to enter Conner’s body and destroy the magical curse from the inside, reasoning that he can become any living form of DNA if he focuses hard enough. The bold strategy works, with the snake emerging from Conner’s body and being killed by Tim before it can attack Bernard. In a private moment in the immediate aftermath, Tim and Bernard finally admit their mutual attraction to each other and enjoy a romantic interlude together between all the super-powered chaos.

RELATED: Titans Is Once Again Not Letting Rachel 'Be' Raven - But It's Different

titans s4e5 bernard tim

Kory’s trainer presents her a vision of a possible future where she and Dick raise their young daughter together in the company of the Titans only for disaster to strike as she is reminded of her horrible fate. The trainer warns Kory this vision will come to pass if Sebastian is permitted to survive and become the foretold demonic enemy -- but Kory rejects this. As if on cue, Mayhem appears at the diner where the heroes are hiding out, having sacrificed one of her friends to gain a stronger handle on her powers, and seizes Sebastian after easily defeating Kory during a brief skirmish.

As Conner recovers from his supernatural ordeal, Gar is able to regain his humanoid form after much effort to his teammates’ visible joy and relief. Mayhem takes Sebastian with her back to her cult’s hideout, where he is greeted by cheering masses jubilant that their prophesied leader has finally joined them. In a place where he feels he belongs at last, Sebastian cannot help but smile as he meets his adoring supporters, hinting at his sinister future as Titans Season 4 nears its halfway point.

Developed for television by Akiva Goldsman, Geoff Johns and Greg Berlanti, Titans releases new episodes Thursdays on HBO Max.