ABC

When Agents of S.H.I.E.L.D. debuted in 2013, it was pitched as a blockbuster superhero series on the small screen that could tap into the Marvel movies and a rich comic-book universe. At first, S.H.I.E.L.D. fell short of its potential and felt more like a cop show than a sci-fi melodrama, though it eventually found its lane by moving away from villains of the week. Despite this progress, the show’s latest episode, “4,722 Hours,” felt like a quantum leap of ambition; it was the kind of epic tale that a previous generation of viewers couldn’t have dreamed of one day seeing on television.

S.H.I.E.L.D.’s improvement has followed the same path as a lot of niche sci-fi shows that initially tried to appeal to a wide audience. Like Fringe, Grimm, or Sleepy Hollow, it first promised to be a series you wouldn’t have to watch weekly to keep up with, with its central characters facing a new supernatural threat every episode. That approach drew yawns from critics and audiences, and so the show revamped its strategy—eliminating the titular agency, having its heroes go renegade, and building out a complex mythology revolving around alien artifacts and an explosion of the superpowered population. Wednesday’s“4,722 Hours” was an impressive mini-movie within this larger arc—and it finally delivered on the show’s grand storytelling promise, proving it’s no longer just an afterthought to the formidable Marvel film franchise.

It’s a little surprising it took Agents of S.H.I.E.L.D. this long to find its groove. After all, it was created by Joss Whedon: a TV veteran who brought comic-book storytelling to the small screen with Buffy the Vampire Slayer and who was once a creative mastermind behind the Marvel movies. But Agents didn’t pick up until the April 2014 release of Captain America: The Winter Soldier, which revealed that S.H.I.E.L.D. had been infiltrated by supervillains and was rotten to the core. Before that, the stodgy cast had been obeying the orders of an unseen bureaucracy; with that bureaucracy removed, they could burrow into larger, wackier mysteries about alien experimentation, Nazi mysticism, and portals to other worlds.

In the second-season finale, the plucky scientist Jemma Simmons (Elizabeth Henstridge) got sucked into said portal, and was only recovered months later. “4,722 Hours” chronicled her journey on the alien world she got stuck on, audaciously never cutting back to the present day or to her Earth-bound colleagues. The episode even had Henstridge’s name come first in the cast order, a rare TV phenomenon (she’s usually sixth-billed). “4,722” bore a superficial (and likely unintentional) similarity to The Martian, but with a more foreboding atmosphere: Simmons was trapped on a planet where the sun seemingly never rose, beset by hallucinatory dust storms, and her only companion was a long-stranded astronaut that NASA had sent through the same portal years before and left to die.

There aren’t many TV shows that could pull an episode like this off. Even the obvious forebears, like the various Star Trek series, would have done so as cheaply as possible, finding some abandoned quarry or quiet forest to shoot in. Simmons’s planet, which was mostly a desert, still felt appreciably alien thanks to moody lighting and foreboding blue camera filters. Her trial to get back home, which viewers knew would end in success, still felt hard-earned, and should powerfully inform her character and the way her team tries to adjust to her presence again.

Aside from the terrific “4,722 Hours,” this season has been building up in other interesting ways. S.H.I.E.L.D.’s first season took place mostly on an airplane, a roving base for the team that could take them to any location in the world but ended up serving as the dull setting for 80 percent of every episode’s action. Now, the show’s expanded cast is scattered across the globe, chasing story threads that occasionally knit together before expanding out again. Fortunately, Agents is laying the foundation for its own stories rather than serving as a larger cog in the Marvel universe. Simmons didn’t visit an alien planet to introduce viewers to a location Thor might visit one day; her tribulations simply existed to deepen her character and tease at some other mysteries.

Since S.H.I.E.L.D. began to find its creative footing, ABC has been looking to exploit that success with multiple spin-offs. Its first effort, last year’s Agent Carter, worked because it was a prequel, revolving around the creation of the agency in 1946. The next planned work, apparently titled Marvel’s Most Wanted, will revolve around Bobbi Morse (Adrianne Palicki) and Lance Hunter (Nick Blood), two characters who brought renewed energy to the second season. The impulse to double down on what’s working makes perfect sense, but it might be a bad idea to start trimming away at its cast.

S.H.I.E.L.D.’s newfound success has mostly come from taking full advantage of its myriad of storytelling options: Rather than just having its agents take on one problem a week, it has a worldwide network of characters working in loose tandem to solve much larger mysteries. This year, “4,722 Hours” had the guts to temporarily abandon that sprawling approach and focus on specific characters for a whole hour. If S.H.I.E.L.D. keeps that kind of ingenuity up, it can elevate itself from a fun sci-fi show to an enduring classic of its genre.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.