Luke Skywalker played an important role in the defeat of the Empire in the original Star Wars trilogy, and Star Wars: The Force Awakens suggested that he would also have a key part to play in vanquishing the First Order. But Star Wars: The Last Jedi took a sharp turn. Luke casually discarded his own lightsaber and initially had no interest in training Rey. He resigned himself to a quiet life, shutting himself away from both the wider universe and the Force itself. He told Rey that “It’s time for the Jedi to end,” and even confessed that he considered murdering Ben Solo, sensing the evil in the young man.

This portrayal was controversial. The Last Jedi became a battleground in the culture wars, with its treatment of Luke serving as a particular point of contention. However, the characterization of Luke Skywalker is very much in keeping with the larger themes of the Star Wars franchise.

At its core, the Star Wars films are built around the idea that every generation is at odds with the one that came before it. George Lucas had originally conceived Star Wars as a film about the Vietnam War; it remains the story of a plucky group of rebels fighting a vastly militarily and technologically superior force. Return of the Jedi even brings the battle into the wilderness of the remote forest moon of Endor, where an indigenous population helps topple the Empire.

The generational conflict at the heart of Star Wars is between Darth Vader and Luke Skywalker, a father and son. Luke confronts the fact that his father was a war hero who has become part of something monstrous, tapping into the anxieties of the children of the ‘60s and ‘70s whose parents had fought for democracy in World War II but had subsequently led the country into fruitless wars in Korea and Vietnam.

The sense of disillusionment runs deeper than Darth Vader. Luke repeatedly discovers that kindly old “Ben” Kenobi lied to and manipulated him by not telling him the truth about his father. Yoda and Obi-Wan also hide the identity of Luke’s sister.

Return of the Jedi ends with a reconciliation between Luke and his father, but also with the death of Darth Vader. Luke burns Vader’s body in a ceremonial bonfire, the son finally emerging from the shadow of his father.

Even as they focus on the glory days of Obi-Wan Kenobi and Anakin Skywalker, the Star Wars prequels tap into the same anxieties. Lucas framed the prequel trilogy as a commentary on the erosion of freedoms during the War on Terror. “The parallels between what we did in Vietnam and what we’re doing in Iraq now are unbelievable,” he stated. “On the personal level (the films ask) how does a good person turn into a bad person, and part of the observation of that is that most bad people think they are good people, they are doing it for the right reasons.”

The prequel trilogy is populated with failed and fallen mentor figures whose glory days lie long behind them by the time that the story begins. These fallen heroes are not always clear-cut villains like Darth Vader or Count Dooku. The saga is sympathetic to characters like Obi-Wan or Qui-Gon Jinn, who are presented as heroic figures trying to do the right thing even as their actions have horrific consequences.

Han Solo and Luke Skywalker fill similar roles in the sequel trilogy. The Force Awakens makes it clear that Han has failed as both a father and a husband, retreating from the hard work of raising a son into his youthful pursuit of smuggling. The Last Jedi reveals that Luke has given up after finding himself unable to build a better world than the one he helped to topple.

This theme of generational strife – with younger generations hoping to build a better world than their parents – continues to resonate today. Last week, school children tried to hold their governments to account on climate change through the Global Climate Strike. “The Squad,” a young and diverse group of women pushing for change within the Democratic Party, have found themselves at odds with the party establishment. It’s appropriate that Luke and Han’s failures in the sequel trilogy are defined largely as the absence of leadership. It has been suggested that Generation X – the one that grew up watching the original trilogy – may never produce its own President of the United States.

Luke’s failure feels different than that of Qui-Gon or Obi-Wan because audiences grew up watching him grow as a hero. Although the prequel trilogy allowed fans to experience Obi-Wan’s glory days, Star Wars introduced the character as a hermit living in the middle of nowhere lying to a child that he had sworn to protect.

This is also why The Last Jedi offers Luke a more compelling redemption than The Phantom Menace offered to Qui-Gon or Star Wars offered to Obi-Wan. At the climax of The Last Jedi, Luke gets to be a hero one last time. He gives the Resistance a chance to escape by confronting Kylo Ren without the use of violence. The idea of Luke Skywalker is strong enough to face the whole First Order alone, even if the person himself (or any person) could never measure up. Luke failed to make a perfect world, just as the generation that grew up watching Luke failed to make a perfect world.

“The greatest teacher, failure is,” Yoda advised Luke. “We are what they grow beyond. That is the true burden of all masters.” In the end, Luke wears that burden with dignity and grace. Who could ask for more?