ROGUE ONE is a Star Wars story born of the present, but it ends in May of 1977. It’s a direct prequel to a movie made in response to Nixon’s reign, and it resonates all the more strongly for opening at the dawn of the Trump era. It’s Star Wars in A-flat minor, using most of the same notes from 40 years ago, pounded out on the black keys.

That’s not to say that Rogue One is “edgy,” meaningless as that phrase has become. But it is on edge: Its heroes are nervous and squirrelly, angry and tired, and frequently scared shitless—of the fascist nightmare of the Empire, of the defeatist infighting of the Rebellion, and of the possibility that the pain of fighting for a better tomorrow will all be for nothing.

But this is still a Star Wars movie, and that means it’s a hopeful one. The kind of hope at Rogue One’s center isn’t triumphant and rewarding like the original. Instead of using its prequel status to scatter winking references like buckshot (although it does indulge a few times too many) it leans on the inevitability of its premise—these are the doomed spies who stole the Death Star plans—to give the characters a more muted victory, the kind that sets up a better future for their loved ones, whether or not they see it themselves. Those characters are sketched in very quickly, and if this had been anything like the prior efforts of director Gareth Edwards, that would have been a problem—he wasted his casts in Monsters and Godzilla, sticking them to the surface of his frame like emotionless Colorforms. (Of Edwards’ multiple stylistic similarities to George Lucas, this is the most troublesome.) But much as the cast of Star Wars saved Lucas’ ass in ’77, the rogues assembled for its prequel bring an abundance of heart and personality.

Felicity Jones bears most of the film’s weight as Jyn, the abandoned daughter of Imperial scientist Galen Erso (a briefly present but effective Mads Mikkelsen), the man who perfected the Death Star. She’s forced into the Rebel Alliance and paired with Cassian Andor (Diego Luna), a James Bond type, but not the swaggering kind (it’s Darth Vader who gets the Connery-style one-liner). Cassian is more of a haunted, conflicted Bond, exhausted by his constant dealing in betrayal and death. The emotion the pair generates is often powerful, and fuels Rogue One’s hope. The most notable of the film’s numerous surprises is that its best scene doesn’t feature cartwheeling X-wings or lumbering, leviathan AT-ATs, but two wounded people trying to make sense of themselves, yelling at each other in the hold of a cargo ship.

It’s not all drama and tears. The film has a dry sense of humor, thanks to Alan Tudyk’s reprogrammed Imperial droid K-2SO, and Jiang Wen and Donnie Yen as essentially ronin of the Force, guardians of a holy temple that no longer exists. The film’s squirrelly nature is embodied by Riz Ahmed’s Imperial defector, and while Ben Mendelsohn’s Imperial Director Krennic gets lost in the sauce as the movie barrels to its packed climax, his oily initial impression stays good to the last sneer.

Star Wars is often championed as timeless, but Rogue One is immediate. Where the saga often treats the galaxy like a playground, Edwards’ environments constantly threaten to fall upon you and swallow you whole. It is gigantic, earnest, and ambitious. It doesn’t always pay off (and there’s a fairly big misfire concerning one supporting character), and you may not leave feeling all that happy. But you will feel hope.