Legion has intentionally been very hard to pin down over the course of its first season, and I knew that I wouldn’t have a strong grasp on what its creative team was doing until I saw the end of this initial story arc. The show exists in the middle ground between a spectacular superhero good-vs.-evil narrative and a more challenging, surreal exploration of one man’s mental illness, and after watching the season finale, it’s clear that Legion prioritizes superhero storytelling while using the psychic elements to add depth to the characters and style to the execution.

The first episodes of Legion set an expectation that the series would be more subversive than it turned out to be, and while it’s still very different from other superhero movies and TV shows in its aesthetic and narrative structure, the broad strokes of the story still fit the genre mold. There’s a part of me that wanted this show to completely upend the formula, but it’s still a product of two massive studios, Marvel and Fox, working within an established superhero universe. Legion took a lot of chances in how it depicted David Haller’s life story and how it fits into the larger X-Men mythology, and I appreciate how those risks made for a more compelling superhero project, even when they were flawed.

I was rarely bored watching this season, and tonight’s finale is one of the strongest episodes yet, offering salvation for David Haller but delivering doom to the rest of the planet. Noah Hawley writes the script for the first time since “Chapter Two,” and his distinct stamp is on “Chapter Eight” from the very beginning. The episode opens with a sequence that reveals what happened to Hamish Linklater’s Division 3 Interrogator — whose real name is Clark — after the events of the pilot left him with third-degree burns on 40 percent of his body. The sequence begins with baroque music and flashes of green and purple rectangles moving into different positions on the screen. The music heightens the melancholy of Clark’s situation, while the constantly shifting geometric display creates a sense of disorientation as these rectangles randomly jump and change their spatial relationship with each other.

Those shapes appear on one of the monitors in Clark’s hospital room, and this opening shows the character’s path from his hospital bed to Summerland, where he leads the group of soldiers ambushing David and his friends. It’s very effective at giving the audience a powerful impression of Clark’s emotional journey during those weeks of recovery, and it significantly enriches the character by showing us the people he cares about and how his condition changes his personal life. He has a husband, Daniel (Keir O’Donnell of Fargo), and a son, and even though he tries to get back into a normal routine with them once he’s out of the hospital, the trauma keeps him at a distance.

Linklater gives a remarkable performance in this sequence, and he captures Clark’s strength and emotional fortitude while also tapping into the intense vulnerability the character is trying to shake. This sequence successfully establishes the high personal stakes Clark has in bringing in David Haller and taking out the Summerland mutants that scarred him, and he refuses to let his current condition prevent him from exacting his revenge.

Clark being a gay man also adds an extra layer to his fear of mutants, and his fight to maintain a life that he had to work hard to gain. When Syd asks him why he won’t just leave them alone so they can fall in love and have babies, she’s talking about a struggle that the queer community constantly deals with — to be given the same freedom that straight people are granted. Clark has gained that freedom, and he won’t let anyone jeopardize it.

D3’s attack on Summerland is immediately stopped when David waves his hand and stacks all the soldiers on top of each other, a display of power that only reinforces Clark’s fears. Melanie Bird recognizes this, but she offers no comfort to the man once he’s brought into Summerland for questioning. Melanie becomes much more ruthless when she and her students are threatened, and she doesn’t mince words when she tells Clark that humankind will need to adapt if it doesn’t want to end up like the dinosaurs in the coming age of mutants. And David is essential to ushering in that age. He’s the world breaker, and if D3 had managed to bring him in before he realized the full scope of his power, Melanie might have been impressed.

Many of the performances in this episode involve the actors shifting from strength to vulnerability. Dan Stevens gets to show David in control of his incredible psychic ability, but at other moments, David is still haunted by the idea that he’s schizophrenic. He can’t be sure that everything isn’t an elaborate fiction created in his mind. Jean Smart is channeling her Fargo season-two character, Floyd Gerhardt, when Melanie is intimidating Clark and trying to convince David to use his power to read the mind of their captive, but she’s much softer and more insecure when she’s dealing with Oliver, who still doesn’t recognize his wife.

Meanwhile, Syd’s love for David makes her vulnerable to the manipulation of Shadow King. Rather than see David die during the procedure to forcefully remove the parasite from his brain, she agrees to give Shadow King a way out of David’s body. Syd is in conflict with Melanie for much of this episode, and she willingly tells Clark about Shadow King, perhaps as a way to make sure D3 knows what it will have to deal with once the parasite is loose, perhaps as a way of building the bridges that David hopes to create so war can be avoided.

Despite knowing that she’s unleashing a devastating evil on the world by releasing Shadow King from David, Syd is completely confident as she heads into Cary’s lab and gives David the true love’s kiss that saves him. It’s a selfish act that ensures Syd gets to keep the man she loves, but it ultimately takes Oliver out of Melanie’s life just as he finally remembers who she is. The slow-motion action sequence of Shadow King jumping from David to Syd to Kerry has a very tense build, leading up to the moment when an awakened David and Shadow Kerry face off in a hall, setting off a psychic shockwave that sends the parasite hurtling toward an unsuspecting Oliver. As the residents of Summerland gain their bearings, Oliver sneaks out while singing “If I Ruled the World,” then grabs a car and drives away with a new parasite feeding on his psychic power.

Aubrey Plaza is hands-down my favorite part of Legion, and the otherworldly nature of Shadow King gives her the opportunity to go wild with the material and aggressively push the character’s seductive menace. Shadow King is especially repulsive in “Chapter Eight” — covered in sores, surrounded by flies, and tracking tar behind her with each step — but it’s impossible not to look at Plaza because she’s exuding so much charisma and having such fun with the role. Shadow King has minimal backstory and is basically pure evil, which isn’t an easy role to make captivating, but Plaza accomplishes it with her presence and the passion in her performance.

Music plays an integral role in Noah Hawley’s TV shows, and this finale has two song cues that feel like they were part of this series in its earliest stages. Pink Floyd’s Dark Side of the Moon has been a major influence from the start, and “Episode Eight” uses a track from that album, “Breathe,” to underscore David’s frantic journey through his memory during the procedure intended to remove Shadow King. That song is all about relishing the sensual experience of life while you have it, making it a smart fit for a sequence that has David looking back on his own life before he begins a new, parasite-free future. T-Rex’s “Children of the Revolution” plays as Oliver and Shadow King make their way south, and it’s a rousing way to end the season, suggesting that the war between mutants and humans is going to heat up now that Shadow King has a new host to help bring chaos to the world.

The credits roll as Oliver and Shadow King drive away, but this is a superhero property, which means a mid-credit teaser. As David and Syd stand on the Summerland balcony, a small floating sphere appears before them, scans David, and then sucks him into the chamber, flying away with him trapped inside. It’s a huge twist to throw into the closing seconds of the season, and I have no guess where the show is headed after such a surprising moment. The unpredictability of Legion is one of the best things about the show, and it’s exciting to have no idea where this superhero property will go when it comes back for a second season.