There is much to love about Game of Thrones. Part epic, part tragedy, part comedy, part romance, part zombie apocalypse—it spans almost the full range of genres. Its sets are breathtaking, its architecture and landscapes inspiring. It has sword fights and flesh, music and dance, exotic cultures and languages, and stories of love, loss and betrayal, none more tragically beautiful than the story of Jon Snow and Ygritte the Wildling.

Despite its titillating tales of sexual transgression, stellar sword fights and wildly disproportionate number of redheads, we should not forget that Game of Thrones is first and foremost a depiction of politics. For all its magic and mysticism, moreover, it offers a remarkably realistic depiction of politics, with valuable lessons for understanding and evaluating politics in the real world.

This realism has much to do with the unapologetic way its characters and their respective deeds and fates have been drawn. The gory fate of its most noble and virtuous characters—Ned Stark, in particular—forces us to rethink common conceptions of nobility and virtue. At the same time, we are encouraged to admire or at least respect even the most unsavory of characters despite our deepest reservations about their motives. The formidable Tywin Lannister is a case in point. The result is a degree of complexity and ambiguity that belies simple moral formulas of good and evil, hero and villain.

The ambivalence we feel towards characters such as Lord Tywin and Ned Stark is a consequence of Game of Thrones’ most appealing feature. Unlike most depictions of politics in popular culture, which tend to offer a moral critique of politics (look no further than Batman, who is always there to save Gotham City from itself, ensuring that moral principle triumphs over self-interested politics), Game of Thrones turns this familiar dynamic on its head. It offers a defense of politics, broadly speaking, as that messy art of compromise, judgment and prudence.

More specifically, Game of Thrones offers a defense of politics against a range of familiar antipolitical ways of thinking and acting, including moralism, brute tyrannical force and emancipatory ideology. Helpfully, we find each of these antipolitical alternatives embodied in specific characters. As a general rule, the further each character strays from politics in their respective antipolitical directions, the worse their fate tends to be.

But what does it actually mean to think and act politically?

In Westeros and the real world alike, disagreement and conflict are interminable features of human coexistence. While many methods can be used to address the problem of ongoing disagreement and conflict, not every method can be described equally as political. Tyrion Lannister makes this point in Season Five when he reminds a brash Daenerys Targaryen that “killing and politics aren’t always the same thing.”

Political rule, as opposed to brute tyrannical force or war, recognizes the ongoing need to shore up legitimacy. Importantly, legitimacy is not something that can be imposed from above through sheer force or terror; it must be recognized on an ongoing basis. The link between power and legitimacy should be clear enough. If power is not recognized as legitimate, we find ourselves with the familiar conditions of resistance and revolt. If a ruler makes no effort at all to shore up their legitimacy, they may not find themselves ruling for very long. This is why Machiavelli advises his hypothetical prince not to become the object of scorn or hatred.

Furthermore, a political ruler does not secure legitimacy by eliminating all those who would oppose or disagree with them, either through purge or cultural revolution. As Aristotle famously remarked, “there is a point at which a polis, by advancing in unity, will cease to be a polis. . . . The truth is that the polis is an aggregate of many members.” The political leader accepts the range of opinions and worldviews as given yet pliable, and so gets to work explaining, persuading, and inspiring support and loyalty. Yet because the world and its people will always to some degree remain resistant, even recalcitrant, to any particular worldview or vision, politics also requires compromise, conciliation, tolerance, and a degree of prudence and self-restraint. It requires a level of responsiveness to the interests, desires and traditions of individuals and groups, though especially large and powerful groups. And it involves the ability to negotiate, form alliances and build consensus across differences. This is why the nineteenth-century German sociologist, Max Weber, likened politics to “slow, strong drilling through hard boards.”

Finally, because there exists no rule book that tells us when to compromise and when to push back, or when or whose interests we should conciliate, and because human life is contingent and ever changing, politics will always involve that somewhat cryptic and unquantifiable quality that we call judgment. Moreover, if Game of Thrones makes clear one thing, it is that no moral code can ever fully substitute for political judgment. Politics requires making choices in a finite world, and the best option will almost always be the least worst option—the lesser evil. Politics in this sense requires an ability to grapple with moral ambiguity, and weigh conflicting relative goods.

There are certain steps a political leader can take to help avoid erroneous judgments. Foresight, or the ability to make accurate predictions about the behavior of others or the likelihood of a campaign’s success, will help a great deal. Yet because, to paraphrase Donald Rumsfeld, politics involves not only known unknowns, but also unknown unknowns, and because people have the capacity for all sorts of treachery and deceit, the prudent political leader must always prepare for the worst to happen. To use Machiavelli’s apt metaphor (not to be confused with the house sigils of Westeros), one must be both “a fox to discover the traps and a lion to terrify the wolves.”

On every one of these points, Ned Stark fails dismally. There is no better example of this than his actions during the events surrounding King Robert’s death and succession in Season One. His only concern is for what is right and in accord with the law of rightful succession, according to which Stannis Baratheon, King Robert’s younger brother, is the rightful heir. Ned is warned of a likely Lannister plot to gain control of the kingdom, by both Renly Baratheon and Littlefinger. What emerges from these engagements is a stunning juxtaposition of men thinking and acting politically and a man caught in the restrictive and self-destructive grip of his moralistic convictions.

Lord Renly and Littlefinger demonstrate foresight, accurately predicting the events about to unfold. This is partly because they understand the deep drive for power in some, and the drastic measures they will take to obtain it. Ned, on the other hand, demonstrates no foresight whatsoever. He is no fox, has little regard for traps and does nothing to prepare for the worst. Renly and Littlefinger use their judgment and exercise political agency by being responsive to the contingencies unfolding around them. Littlefinger’s first word after learning of Ned’s intention to hand power to Stannis is “Unless. . .” He is abruptly cut off by Ned who asserts doggedly, “There is no unless.” In his encounters with both men, Ned is visibly frustrated by the very idea of having to grapple with moral ambiguity and consider contingencies and hypotheticals outside of his blinkered and myopic vision of a smooth transition of power to the rightful heir. Ned has barely a political bone in his body, and he ends up paying for that with his life.

At the other end of the spectrum lies Joffrey, your run-of-the-mill tyrant who rules through brute arbitrary force. Joffrey would have done well to have read his Machiavelli. His first act as king is to cut off the head of the Warden of the North (Ned), and we soon begin to see the full uncompromising brutality of his reign. Good men are made to fight to the death for entertainment. The economy suffers and people begin to starve. Babies are taken and slaughtered in front of their mothers. Pure tyrannical force, it seems, has won the day.

Very quickly, though, we begin to see the limits of tyranny as a form of rule. Like clockwork, the people of King’s Landing begin to rebel. Joffrey is pelted with manure and insulted as he walks through the city streets. Some of his guards are killed. His response echoes the famous last words of the Mad King: “kill them, kill them all!” He is oblivious to the fact that his words reflect the very attitude that caused the problem he finds himself in. Insofar as it tends to produce the familiar conditions of revolt, tyranny is an inherently unstable form of rule, prone to spontaneous combustion.

So what about Daenerys? Up until the end of Season Three, there is not much about her approach to rule that is political. On the contrary, she is an unrepentant ideologue, ruthless and uncompromising in her quest to free slaves and destroy not only their owners but the culture and traditions that sustained slavery. She responds to signs of resistance by holding fast to the truths she knows. You’re either a friend of the revolution or you’re an enemy.