Hugh Jackman’s last run as Wolverine, Logan, was marketed as a new-age Western from the very beginning. Everything from the imagery in [high-contrast black-and-white of the film’s advertising scheme to the jaw-clenching grit of the various trailers led toward one conclusion: James Mangold’s Logan would be the near-future superhero Western no one knew they wanted. The film’s premiere on March 3 confirmed it.

This post contains major spoilers for Logan.

There are few outright references. Logan is a love letter to the Western imagery cinema more than anything else. It plays with elements of belonging, family, justice, and takes place (partly) in the Western United States among sweeping fields and red-rock cliffs. The setting is, primarily, what grounds Logan as a neo-Western. Sure, there are a couple cowboy hats, a lot of guns, a farmhouse, and several beautiful horses, but the biggest hat-tip comes in the form of several appearances from a classic Western: Shane.

Shane, the 1953 film based on the 1949 novel of the same name by Jack Schaefer, won the 1954 Academy Award for Best Cinematography and received Oscar nominations in five other categories, including Best Picture and Best Director. It’s revered for its landscape cinematography as well as its general contributions to the Western genre.

As far as the plot goes: Shane (Alan Ladd), the main character, comes riding into a valley in Wyoming sometime after the Civil War. He ends up saving the residents of said valley from a local cattle baron who’s been intimidating the residents into leaving their homes behind, all the while befriending a family and becoming a bit of an icon in the eyes of a young boy, Joey.

A gun, Shane says throughout the movie, is as good or as bad as the person using it. Joey’s mother doesn’t like him being around guns, and her hope is for him to grow up in a world where he doesn’t have to deal with the kind of pain and loss that comes with them.

In Logan, Shane makes its first appearance while Logan, Charles Xavier (Patrick Stewart), and Laura (Dafne Keen) are hiding out at a casino hotel to get a few hours of rest. Shane is playing on TV, and Charles is eager to explain to Laura, who has quickly become his pseudo-granddaughter, that he first saw this film when he was her age. By the year 2029, the movie is “almost 100 years old,” Xavier tells her.

Several scenes of the movie are seen, but the most vital one to both the history of Westerns and Logan as a whole comes in the form of the main character’s final monologue:

“Joey, there’s no living with it,” Shane says to a teary-eyed Joey at the end of the movie. “The killing. There’s no going back from it. Right or wrong is a brand. A brand sticks. There’s no going back. Now, you run on home to your mother and tell her … tell her everything’s alright. There aren’t any more guns in the valley.” Shane encourages Joey to grow up to be a strong, good person. And then he leaves, ignoring Joey’s cries for him to “come back.”

It’s this monologue that Laura delivers to Logan’s grave after she and her friends have buried him at the end the movie — after Laura has referenced Logan as her father for the first time and he sacrificed himself to save her.

In this case, Laura is transformed instantly from Joey to Shane. She knows that Logan and Charles would want her to have a life free of violence and one free of the pain and loss that comes with it — they would want her to be Joey. But, instead, she’s suddenly become Shane. Logan already earned his brand, showing his true, heroic colors in his final moments. Laura will have to carry on without him, no matter how much she wants him to come back. She’ll have to ride off into the sunset.

Logan is now in theaters.

Photos via Paramount Pictures/20th Century Fox