Screenwriting for superhero movies is no easy task. Good drama requires believable conflict, but when your main character is “The Fastest Man Alive” or “The Strongest There Is,” it’s difficult to create a story that audiences want to invest in.

Take “The Avengers,” for example. The super-team’s roster includes a god, a billionaire, the perfect soldier and rage personified. There aren’t any imaginable enemies who could defeat them, so writers respond by pitting the heroes against vast, generic armies of robots or aliens, and raising the stakes to world-ending levels.

“Logan” brilliantly does the opposite. Instead of needing to save the world or the mutant race, Hugh Jackman’s clawed Canadian has to save a child by driving her to a safe haven he doesn’t believe exists. Instead of fighting armies of CGI extraterrestrials or Skynet-lite, Logan battles a couple dozen men with guns working for a corporation that doesn’t give a damn about human rights.

Writer and director James Mangold further tinkers with the superhero formula by playing with Logan’s vulnerability. Traditionally, Wolverine is nigh-invincible; his unbreakable bones and ability to heal from any wound mean that audiences never fear for his safety, and never doubt that he will emerge victorious. But in “Logan,” the titular hero’s metal skeleton is poisoning him, slowing his healing powers. He ages, he scars and his claws don’t all ‘snikt’ out like we’re accustomed to.

The result of Mangold’s genre subversion is a superhero movie that forces audiences to feel. Every injury Logan sustains makes a viewer want to cringe, and in a franchise-first, we fear for Wolverine’s survival. When Logan sprints into gunfire, Wolverine is actually taking a risk, and suddenly the things he’s fighting for become more than just plot devices; they become a cause.

Wolverine’s weakened healing means the claws hurt him more and emerge less, leading to a riveting almost-showdown where Jackman uses nothing but his size to intimidate his enemies. Much like “Jaws” or “Jurassic Park,” Mangold uses his clawed monster sparingly, a choice that separates “Logan” from previous films, where viewers could reliably expect every conflict to resolve with a face-stab. Withholding the action this way reminds viewers how terrifying Jackman can be, and keeps them guessing.

Make no mistake: when the claws do deploy, faces get stabbed. Unlike its’ PG-13 predecessors, “Logan” doesn’t fear showing its’ audience the full, graphic effects of getting punched in the face with three of the sharpest objects on the planet, easily earning it an ‘R’ rating. Unlike DC’s recent films, Mangold and company have found a way to make a somber, brooding superhero movie that doesn’t also suck.

Excluding younger audiences hasn’t hurt “Logan” at the box office. It surpasses more than half of the previous X-movies and places fifth in all-time ‘R’ rated openings (beating Fifty Shades of Grey and proving my hypothesis that face-stabbing will always be more appealing than weird sex).

“Logan” has been described as “the Dark Knight of Marvel” by more than one critic, but that comparison severely undercuts how good this movie actually is. Christopher Nolan’s trilogy was compelling because Batman was brooding and serious, a departure from the campy superhero films of the nineties. Yet in comparison to Logan, whose race has been eradicated and who has to drive future-Uber to keep a dementia-ridden Professor X from telepathically killing millions, the billionaire Bruce Wayne’s troubles seem like teenage angst. It’s a testament to Mangold’s script that the more narrowly focused, lower stakes “Logan” manages to be a better story than the previous genre-best.

Instead of a hyper-realistic Gotham (that looks strangely like Pittsburgh), Mangold opts for a dusty, desolate American Southwest. It’s not a post-apocalyptic wasteland nor a full-on dystopia, but the sense that the U.S. is in decline is inescapable. The cities feel empty and the police are nowhere to be seen. Logan has no troubles crossing back and forth across the Mexican border, and farmers with guns seem to rule rural America. The bad guys aren’t just above the law; there doesn’t seem to be a law.

The oddly appealing setting feels like a near-future wild west, harkening back not just to “Shane” and Clint Eastwood’s “Unforgiven,” but also Cormac McCarthy’s “No Country For Old Men” and “Mad Max: Fury Road.” Jim Croce and Johnny Cash are both featured, but the absence of more modern music contributes to the pervasive feeling that the world is regressing.

The genre-defying story and the rich, strangely familiar environment, in combination with poignant performances from Jackman and Patrick Stewart’s Professor X push “Logan” past the realm of good film, making it the hands-down best superhero film in existence. Its’ parting shot is not just a terrific way to end a movie (and Jackman’s last as Logan), but a perfect way to end a genre. Legions of imitators are sure to follow. None will compare.