Even if you tuned in to watch the Game of Thrones series finale last night, you probably missed a subtle homage to philosophy in one of the HBO show’s final moments. The GoT showrunners might not have delivered fans the ending they wanted, but Season 8, Episode 6, “The Iron Throne,” had an awesome reference to Plato’s political theories delivered straight from his famous “Allegory of the Cave” that may reveal where the series was heading all along.

Warning: Major spoilers for the Game of Thrones finale (and, I guess, Plato’s “Allegory of the Cave”) below.

The “Allegory of the Cave” is an excerpt from Plato’s book, The Republic. The story begins with prisoners who are born and raised in a cave. They know no different and don’t question their circumstances. Then, one of the prisoners escapes the cave and discovers the truth. They eventually come back to tell the others. The escaped prisoner is an analogy for the enlightened person who understands the true nature of the world and is best fit to rule. Their understanding of truth better enables them to make moral decisions and rule justly over their people.

The goal of The Republic is to describe the most ideal political state: a society ruled by elected officials. According to Plato, the perfect rulers (aka “the philosopher kings”) are people who don’t want to rule but are naturally good at it. This ensures those who are best fit to rule aren’t driven by power, fame, or wealth. Rather, they rule because they excel as leaders and genuinely care for the welfare of their people. If you watched the political leaders of Westeros pick Bran as their new king in the Game of Thrones finale, you can probably guess where this is headed.

King Bran HBO

Here’s a key passage from Plato’s The Republic, Book 7, “Allegory of the Cave”:

The life of true philosophy is the only one that looks down upon offices of state; and access to power must be confined to men who are not in love with it; otherwise rivals will start fighting.

Right off the bat, this automatically disqualifies Edmure Tully, who votes for himself and gets interrupted mid-sentence by his niece, Sansa Stark.

A philosopher king would never vote for themselves! HBO

Another important feature of Plato’s ideal ruler is something he calls “knowledge of the Good.” This phrase has been widely debated in academia and has no real concrete definition (some philosophy Ph.D.s have gone as far as to write their graduate thesis on this subject), but it is generally considered that Plato’s ideal ruler has the ability to actually know what is right and wrong and when to apply it.

For Game of Thrones, that would mean Tyrion’s political endorsement is correct. Bran is the only person who knows the entire history of his world. He has special knowledge, which, by Plato’s standards, gives him an advantage as a ruler.

Bran is Plato’s escaped prisoner. He understands the truth about the world and can make informed political decisions from his understanding of all the world’s history. He is the only one who understands how the world came to be and can keep history’s mistakes from repeating.

And the 2020 presidential nominees are... HBO

Finally, a somewhat surprising facet of Plato’s political theory is that he does not believe a democracy is the ideal political state. Game of Thrones suggests this too when Sam’s proposal to invent democracy and allow everyone in the realm a vote gets summarily dismissed. Once the laughter dies down, a discussion over who will make the best leader actually begins.

Sam gets bullied for suggesting they open up the floor to a democratic vote. HBO

The “Allegory of the Cave” is a story that’s been covered in pop culture many times (here’s looking at you, The Matrix and Westworld), but putting Plato’s words in Tyrion’s mouth and using his philosophy to pick a new ruler for Westeros suggests that either the original author, George R. R. Martin, showrunners Benioff and Weiss, or both modeled their entire story after Plato’s principles. If that’s the case, then by those same rules, any character who ever sought the Iron Throne (from Daenerys to Cersei to Stannis Baratheon) was destined to fail.

Katherine Hartling is a former philosophy professor and current software engineer. Follow her on Twitter for updates on coding and life in Williamsburg, Brooklyn.