We know D.C. Get our free newsletter to stay in the know.

Captain Marvel veers between inspiration and formula. It can be a stirring story about a young woman who asserts her independence as a free thinker and fierce warrior. That story, unfortunately, contorts around a narrative that leaves little room for character development. A “fish out of water” premise is common to superhero movies, but they’re often anchored by a strong lead who never compromises their core values. This film has little opportunity for that, relying instead on spectacle, nostalgia, and intriguing subtext. When the hero self-actualizes, the result is downright thrilling. It just takes too long to get there.

There is a long prologue where directors Anna Boden and Ryan Fleck introduce us to Vers (Brie Larson). She fights with an alien race called the Kree, and she has little memory before she found herself in a war against a shapeshifting alien race called the Skrulls. After a mission goes awry, Vers finds herself on Earth, where she meets Nick Fury (Samuel L. Jackson). The film takes places in the mid-1990s, so this is before Fury has his shaved head and eyepatch. Indeed, he is skeptical of Vers’ talk of aliens, at least until he encounters one on his own. He tags along on Vers’ journey to find an energy source that both the Kree and Skrulls desire, while she also learns the secrets of her past.

The 1990s setting leads to some inspired moments, and others that will cause true ’90s kids to roll their eyes. When Vers crashes on Earth, it is into a Blockbuster Video. Music cues include songs with female vocalists, although they have little to do with what happens on screen: both “I’m Only Happy When It Rains” and “Waterfalls” play while Vers is in the desert. What is more fun is how Boden and Fleck borrow from classic ’90s road movies. The shapeshifting Skrulls are the like T-1000 from Terminator 2: Judgment Day, since the heroes never quite know who to trust. Jackson’s presence here also recalls the action thriller The Long Kiss Goodnight, another film where he played second fiddle to a powerful woman with amnesia issues.

Despite echoes of other ’90s films, Vers is a touch too underdeveloped. She has little personality beyond the occasional quip and desire to complete her mission. Larson does what she can, but her natural charm is not enough to shake the narrative autopilot on which the film operates. Still, we get some hints at her past through hallucinatory flashbacks. There is a strange sequence where Skrulls attempt to extract details from Vers’ memory, and we see moments that take place on Earth. We know Vers is human before she does, so there is added resonance because the scene is about patriarchal forces keeping her down. This leads to a shrewd reversal, and the film’s strongest moment: Vers finally intuits what makes her courageous and unique, and it neatly dovetails with feminist ideals. This moment of genuine empowerment is due to strong imagery and editing, however, and not Larson’s performance.

The Marvel Cinematic Universe has been telling origin stories for over a decade, and like Captain America: The First Avenger and Black Panther, Captain Marvel also features action sequences on a train. In other words, it takes a lot for the character beats and action sequences to not feel perfunctory. Fleck and Boden do not have a gift for action choreography: The chases, space battles, and fights are kinetic without much purpose. They do excel, however, when they insert sly humor into the action: Like their early work Half Nelson and Mississippi Grind, the filmmakers use surprises and misdirection to keep us interested. That is for the best, since the special effects in Captain Marvel pale in comparison to other MCU films. While quantity does not necessarily equal quality, the end credits here include only a fraction of the animators listed in Infinity War, suggesting a smaller special effects budget.

Infinity War viewers will recall that Nick Fury calls Captain Marvel when The Avengers are in big, big trouble. This is like a mea culpa for a franchise that took too long to develop a film where a woman is the lead. Still, as a demigod of pure energy whose North Star is helping the disenfranchised—this film ultimately works as an allegory for Middle East conflict (yes, really)—she is a welcome salve to heroes in the midst of despair. Cynical fans may think Captain Marvel is too little, too late, yet it convincingly makes the case she arrives right on time.

Captain Marvel opens Friday in theaters everywhere.