“Logan” is not a superhero movie. It’s a western and a character drama, both starring superhumans. But still, “Logan” is not a superhero movie. It has no interest in heroism. It may be interested in duty and responsibility (which, I guess, comes with Great Power), but it could not be less interested in heroes.

Taking place in 2029, the film — directed by James Mangold — tells the story of the waning days of Wolverine, played for potentially the final time by Hugh Jackman. Once a member of the X-Men, Wolverine/Logan is now a limo driver whose mutant abilities (most notably, his healing factor) are abandoning him. He cares for Charles Xavier (Patrick Stewart), who is now in his 90s and losing his mind along with his ability to control his immense psychic power. This causes Xavier to descend into dementia-adjacent states of delirium during which he unleashes paralyzing blasts of psychic energy, potentially fatal and restrained only by the drugs with which Logan must regularly inject him. In a world where mutants have begun to mysteriously die off, Xavier and Wolverine stumble across a young girl with surprisingly familiar powers. Once they discover she is being hunted by a militant and shadowy corporation, they must go on the run to escort her to a promised safe haven.It’s not a daring plot, but Mangold wrangles the excess of narrative into a shockingly powerful film, buoyed by a slate of magnificent performances and a sense of profound, lived-in sorrow. There are few moments of levity or security over the course of the picture’s nearly two-and-a-half hour run time, but, somehow, the movie never feels oppressive, remaining intimate and human despite its epic scale.

It’s the common criticism of comic-book films that, recently, these pictures have all tried to follow in the footsteps of Christopher Nolan’s vastly overrated “Dark Knight” trilogy (no matter what anyone says, “Batman Begins” remains the best of those films). Seen at the time of their release as revolutionary for their realistic and “gritty” approach to what is a fundamentally goofy mythology, they became a template for nearly every non-Marvel superhero film to come. Whether it was Superman committing near-genocide in some sort of 9/11-reenactment in “Man of Steel” or Spider-Man being forced to brood himself out of a franchise in the “Amazing Spider Man” films, the standard became that, if your superhero movie tried to be bright or happy, the result just wasn’t mature enough to be taken seriously.Ironically but not surprisingly, this faux maturity quickly wore thin. Rather than looking like daring cinematic exercises in grounding outlandish stories, this new era of comic-book pictures seemed more akin to an angsty teenager approximating what he thought adulthood was. These films were cartoonish in their darkness, so painfully affected that the realism being trotted out was the most artificial element in any given movie.

Part of this is what made Marvel Studios’ own superhero films so successful. They were the antidote. Unabashedly goofy, colorful, and fun, they were a breath of fresh air, arguing with each installment that it was possible to be a good film without being so self-consciously serious. In fact, it now seems like any superhero picture that portrays itself as some serious deconstruction of genre is a disaster waiting to be witnessed and endured by begrudging audiences.

Which makes “Logan” all the more exciting. Because this is a film that’s looking to deconstruct its character. This is a film that has injected real, brutal violence into its action. This is a film that wants to be serious and somber.

But what “Logan” understands (which is something like the abhorrent trash-fest of “Batman vs. Superman” does not) is the subtle and important difference between play-acting realism and actually embracing it. “Logan” is not looking to be violent or upsetting just to prove its own worth. The violence and the seriousness are a necessary component of the story, and the film examines them in good faith. Wolverine is by nature a violent character and “Logan” takes place in a violent world. But the movie is also constantly asking what that means. What is the toll of living violently? Can there be any peace or rest when you’ve built your legacy on brutality?

“Logan” is a haunted film: a quest for redemption by a man who is unsure whether that’s something he even wants or deserves. The action is stunning, but for every decapitation and impalement there’s a sense of the physical and spiritual strain. Because of his healing factor, Wolverine has always been able to inflict and suffer massive amounts of pain. Now that that power has begun to disappear, the years of physical suffering and injury are beginning to catch up. He now has to see the damage written on his own flesh. He cannot deny the truth of this violence any longer. Mangold’s film is by no means a perfect one, but it’s one of the most potent and fascinating entries into its genre in years: a more meaningful exercise in the grounding of the un-grounded than even the salivated-over “Dark Knight.” Its villains aren’t very interesting or fleshed out, but ultimately that’s sort of the point. This isn’t about the specific enemies, because the faceless mass of men that Wolverine will have to kill are just one more illustration of the blind berserker nature of his life and legacy. The picture would rather invest time and energy in its protagonists than spend narrative resources crafting some intricate Big Bad. Just as Heath Ledger’s showy Joker performance rendered Christian Bale’s Batman a near-non-presence in his own franchise, Mangold and company seem to suspect that too bombastic an antagonist would only distract from the subject of their picture: a broken man wondering what repairs can still be made. Set against a desert wasteland, “Logan” is the “Unforgiven” of superhero movies, a recognition that when it comes to the burdens and the sins we shoulder through our lives, to quote Clint Eastwood in the latter film, “deserve’s got nothing to do with it.”