Warning: This story contains possible spoilers for Thor: Ragnarok.

Marvel‘s Thor trilogy is an epic argument against hereditary monarchy.

In the first film, Thor is an irresponsible celebrity prince. His father, Odin, ends up banishing him to Earth to learn some common sense—the Asgardian equivalent of a misbehaving frat bro who embarks on a gap year to Find Himself. Miraculously, this actually works for Thor. But to be honest, the initial problem was partly caused by Odin’s crappy parenting.

Loki has a more thoughtful attitude to power, but he couples it with a massive inferiority complex. After learning that he’s adopted, he flips out and tries to prove himself by committing genocide against Asgard’s old enemy, the Frost Giants. Thor saves the day and Loki gets banished, but that’s hardly a ringing endorsement for Asgard’s system of government. By The Avengers, Loki has become a full-blown supervillain. Raised as a prince, he believes he has a divine right to rule.

In Thor: The Dark World, Thor admits that he’s not ready for the throne. Meanwhile, Loki kidnaps Odin and secretly takes his place. Thor: Ragnarok confirms that Loki would make a horrible king, spending more time stroking his ego than ruling Asgard. The film has a pretty straightforward anti-monarchist sentiment, with one exception: the ending. Thor winds up as Asgard’s de facto leader, even though Heimdall should clearly be in charge instead.

While Thor is trapped on Sakaar, his sister Hela conquers Asgard. Heimdall leads the resistance against her, getting the civilians to safety before Thor arrives for the final battle. This division of power is a good fit for both characters. Thor is great when it comes to flashy heroics, but it’s hard to imagine him staying awake through a budget meeting. Heimdall, on the other hand, was always the most sensible of Odin’s advisors.

Ragnarok ends with Thor captaining a spaceship of Asgardian survivors; the king of a refugee nation. It’s a fitting conclusion to the trilogy, showing how Thor has matured and accepted responsibility. That being said, it’s not a sustainable arrangement. Thor is still a short-tempered doofus, and hereditary monarchy has consistently led to disaster for Asgard. Hopefully by the end of Avengers: Infinity War, Thor will have handed the reins to Heimdall, who is far better suited to the daily grind of leadership.

Beyond the family drama of Odin’s children, Ragnarok raised questions about Asgard’s dark past. Odin was originally introduced as a wise leader and a flawed father, but Hela’s backstory suggests something more toxic. As the original heir to the throne, she helped Odin conquer an empire. Then once Odin had sufficient power, he rebranded himself from warrior king to venerated statesman. In an evocative scene toward the end of the film, Hela smashes a mural of the royal family to reveal the truth beneath: a hidden history of bloodshed. Hela was Odin’s weapon of mass destruction, but she didn’t fit his benevolent new image.

Surveying the riches of Odin’s kingdom, Hela asks, “Where do you think all this gold came from?” The obvious answer is conquest. This may be the most effective piece of political commentary in the Marvel franchise, and it probably traces back to Taika Waititi. As Dan Taipua explains in this great piece at The Spinoff, Waititi’s Maori background is an unmistakable influence both behind the scenes and onscreen, from political subtext to aesthetic choices. Woven into the lighthearted comedy of Ragnarok, there’s a deeper allegorical role for Thor and his world. It shows how Asgard’s prosperity was built on the subjugation of the Nine Realms, with Thor as a naive beneficiary.

Between all the jokes and action sequences, Ragnarok concludes this arc with a thoughtful resolution. Thor no longer sees his father as infallible, understanding that leadership is more complicated than proving your worth to a magical hammer. In turn, Asgard now has a more complex identity than the fantasy landscape of the first two movies.

Building on a minor element from the first film—the fact that Odin stole a vital power source from the Frost Giants—we have to assume that Asgard profited from its position of power. We also see the divide between Odin’s superpowered family, and the Asgardian civilians who fled Hela’s attack. Asgard’s destruction is an ideal ending, saving the civilian population while removing the royal family’s seat of power. It’s kind of a redemption arc for Odin’s ugly legacy, coupled with some insightful commentary on the generational impact of colonialism. So, yes. Thor: Ragnarok is one of the most political Marvel movies to date.