Beneath all the well-worn fantasy tropes and flashy special effects -- the CGI dragons, the armies of evil ice zombies, the clichéd Christ allegories about magical heroes coming back from the dead -- at its heart Game of Thrones is really just a giant mashup of European history. Twenty-five million or so rabid fans are certainly looking forward to watching computer-generated dragons torch equally pixelated ice demons in the new season that starts this Sunday on HBO, but the biggest thrills in Game of Thrones arguably come from seeing real-world history recreated onscreen in the guise of a fractured fairytale. Like Homer’s mythical reimagining of the Greek past or Sir Walter Scott’s best-selling historical novels in the 19th century, HBO has come to dominate the 21st-century cultural landscape by producing the most spectacular history lesson on TV. The historical parallels in Game of Thrones are almost too easy to pick out. (Unless you’re looking for non-Western history; then you’re mostly stuck with flat racist stereotypes. More on that in a bit.) The continent of Westeros, where the show’s main action takes place, is shaped like Britain and Ireland, and the massive ice wall that keeps out the Wildling barbarians from the North just so happens to be at the exact same spot where the Romans built Hadrian’s Wall to keep out the Celtic tribes. Similarly, the civil war at the center of Game of Thrones mimics the 15th-century War of the Roses, when the houses of York and Lancaster fought a bitter internecine battle for the English throne -- in Westeros, the Lancasters go by Lannister. The Ironborn raiders, who sail around in longships, are stand-ins for the Vikings, while the Free Cities on the continent of Essos represent the Italian city-states, right down to the island-city of Braavos, which is duly filmed in Venice. And the Valyrian Empire, which was famous for its engineering feats and military power, has crumbled into a pile of elegantly twisted ruins reminiscent of ancient Rome. It isn’t just the real-world history behind Westeros that draws in fans, though. The made-up history within the show, much more than the dragons and ice zombies, is what drives the story forward. The plot hinges on big revelations about the personal histories of individual characters (who are Jon Snow’s parents?) and the larger political history of Westeros (who is plotting with Varys to restore the Targaryen Dynasty to the Iron Throne?). Readers of the original books by George R.R. Martin will appreciate just how critical the fictional history of Westeros is to the epic war the story depicts. Martin delights in taking long, world-building digressions to explain the minutiae of Westerosi history, from ancient patterns of human migration to the tangled lineages of important noble families, the source of all present-day conflicts. With a less agile and inventive writer, this would be a mind-numbing drag on the narrative, but in Martin’s lively prose, the history lessons can be even more entertaining than the fight scenes. The classicist and critic Daniel Mendelsohn says that Martin writes with “Herodotean gusto”: Martin describes the wonders of the Westerosi landscape and the wars between its peoples in the same exuberant and exorbitantly detailed style as the (partly) factual travelogue, conveniently called the Histories, in which the ancient Greek Herodotus invented the genre of history-writing in the 5th century BCE. But Game of Thrones is better seen as a 21st-century echo of William Shakespeare. Martin’s plots borrow heavily from Shakespeare’s English history plays and the late-medieval time period they portray. More importantly, both Martin’s books and HBO’s TV adaptation have a distinctly Shakespearean view of how history works and why it matters. When King Robert dies in season one, it sets off a war of succession between his friends, brothers, bastards, and opportunistic lesser lords that might as well be the War of the Roses. Shakespeare, of course, wrote eight or so plays about the War of the Roses and its backstory, starting chronologically with Richard II -- in which Henry Bolingbroke usurps the throne from Richard II and names himself King Henry IV -- and tracking the complicated fallout from Henry’s rebellion in Henry IV Parts 1 & 2, Henry V, Henry VI Parts 1, 2, & 3, and Richard III. (You thought Hollywood was obsessed with sequels.) Both Shakespeare and Game of Thrones use the War of the Roses to explore how rulers seize and justify their power. In Richard II, when Henry usurps the crown through raw military force, he also makes sure that Richard II legally abdicates the throne and names Henry as his heir. In Game of Thrones, Cersei tears up King Robert’s will, bribes the city guards to help make her the Queen Regent, and forces the legal regent Ned Stark to publicly confess to treason. In these fictional recreations of factual events, both Shakespeare and Game of Thrones turn English political history into a tutorial on the workings of constitutional government. It’s political science 101, with dragons. Importantly, Shakespeare shows us the big-picture political clashes of English history from the viewpoints of individual characters -- that’s why there are so many soliloquies in his plays, times when a single character onstage shares his or her hidden thoughts with the audience. In Henry IV Part 1, for instance, Prince Hal (the future King Henry V) is a drunken lout who likes witty banter and chasing after prostitutes and has to wrestle with what he truly believes, but when it’s time to fight a war to protect his father’s kingdom, he turns out to be a highly effective soldier. In Game of Thrones, Tyrion is a drunken lout who likes witty banter and chasing after prostitutes and has to wrestle with what he truly believes, but when his father orders him to defend the kingdom, he turns out to be a highly effective . (He also channels John Falstaff, the charismatic, ingenious outsider of Henry IV Part 1: Tyrion faces social stigma as a dwarf, where Falstaff is mocked for his “fat-witted” enormity.) Game of Thrones, like Shakespeare’s play, uses an outcast with a brilliant mind, a sharp tongue, a taste for wine, and a non-normative body to explore what makes a good leader and what obligations we owe to our family and country. Take a final example, this one directly from Martin’s books. When the rebels overthrow the Targaryen Dynasty, they kill the king’s two small children, Rhaenys and Aegon. But Aegon, it turns out, may have survived -- or at least a young man who claims to be Aegon arrives in Westeros with an army to retake his father’s throne. This mimics the bizarre real-life tale of Perkin Warbeck, a twenty-something pretender to the English crown who claimed that he was one of the two young princes famously murdered in the Tower of London by their usurping uncle Richard III. Perkin Warbeck crossed the English Channel to Kent in 1495, supported by nobles from Scotland and mainland Europe, and led a series of armed revolts before he was finally captured and hanged in 1499. Shakespeare’s contemporary John Ford wrote a play called Perkin Warbeck that tells this story in order to ask a fundamental question: what makes the king the rightful king? If you remember Varys and Tyrion’s drunken banter about what makes a good ruler on their road trip in season five (not to mention countless other characters’ disquisitions on the nature of power), you know that’s the big question at the heart of Game of Thrones too. In his history plays, Shakespeare reimagines the English past in order to ask, again and again, what makes the king the king. Is the rightful ruler chosen by God, or determined by laws and constitutions written by human beings? Is the ruler simply the person with the most money and military power, or should the ruler be the person with the best record of actually getting things done? Game of Thrones uses European history for the same reason: to stage a debate about how leaders gain and lose the legitimate right to rule. Martin’s books and HBO’s show give a dazzling array of different answers to that question. For Cersei, the answer is raw power -- swords create legitimacy, and she refuses even to pretend to care about her subjects. For her son Tommen, the answer is religion: the backing of the Faith conveys political legitimacy. For Stannis Baratheon, the answer is law and blood, the laws of succession that determine who should wear the crown when each king dies. For Jon Snow, the answer is that a good ruler should be elected and should have the right intentions and high moral principles. Jon’s followers, of course, end up killing him because he follows his principles. Then again, Jon also gets resurrected like Christ. Daenerys is the most interesting case. She experiments repeatedly with how to legitimate her rule, from blood (her father was the king) to marriage (her husband was the Khal) to divine right (she appears to be the magically anointed savior of the world) to moral principles (she frees the slaves) to pragmatic success as a ruler (she spends multiple seasons bogged down in Meereen trying to improve her subjects’ lives). Her career as a queen is like a laboratory where Martin tries out the different styles of leadership represented in Roman and English history. Daenerys’s attempts to rule also reveal the profound shortcomings of the focus on European history in Martin’s books and HBO’s TV adaptation. Daenerys swoops in like a deus ex machina on dragonback to liberate the oppressed people of color from Game of Thrones’s equivalent of the Middle East. In doing so, she (and the books and TV show) writes out the many historical non-Western models for political legitimacy (Al-Farabi, say, or Ibn Rushd; Confucius, or the Bhagavad Gita) and implies that it takes a white person to run an enlightened political system based on individual liberty. This isn’t very surprising: Art reflects the society around it, and plenty of Americans couldn’t believe a black man was the legitimate president of the United States. On the other hand, Game of Thrones goes powerfully in on the idea that a woman can be the most legitimate political leader in a crowded field. For Daenerys in this upcoming season, the woman card might turn out to be a winning hand. Game of Thrones’ obsessive anxiety about the roots of political legitimacy helps explain why it’s such a smash hit right now. The question of what makes a ruler legitimate has been the central issue in American political life for the last fifteen years, from the mainstream to the fringe. Who won all those hanging chads in Florida in 2000? Was 9/11 an inside job? Was the Iraq War a legally and morally legitimate use of force? Was George W. Bush within his rights to have terrorism suspects indefinitely detained and tortured? Was Barack Obama really born in America, or is he a secret Muslim agent smuggled in to undermine the country? Did Donald Trump work with the Russians to steal the presidency? Can international climate accords legitimately control what America does? Does the press bravely speak truth to power, or is it all just fake news? The world of Westeros, like the European history on which it’s based, implies that political legitimacy is both real and perceived: it rests on the power to rule, but it also lies in the eyes of the beholders, the everyday citizens who see their leaders as legitimate or not. Appearances, as Shakespeare knew, are everything -- all the world’s a stage. Or, as Shakespeare’s ruler Queen Elizabeth I put it, “we princes, I tell you, are set on stages, in the sight and view of all the world.” It’s a lesson that George R.R. Martin’s characters have to learn. Robb Stark, for instance, manages for a while to maintain both the moral high ground and the military successes necessary to make himself a king. But when his underlings think he has acted illegitimately -- breaking his betrothal to the Freys and letting his mother get away with freeing Jaime Lannister -- they abandon him and kill him. In Game of Thrones, peaceful government depends on a system of political legitimacy -- an agreed-upon set of norms about who gets to rule and how -- but most of the time, that rule collapses into chaos and bloodshed. The show ultimately reminds us that the institutions that create political legitimacy -- our laws, beliefs, customs, and constitutions, the stories we tell ourselves about why our leaders get to lead -- can be as fragile as Ned Stark’s neck, ready to explode when the next tyrant with a fop of yellow hair like Joffrey Baratheon slouches along. Behind the idealistic fantasy battle between good and evil, Westerosi history, much like our own real-world history, implies that if we want good government, we have to fight for the institutions that protect political legitimacy and preserve the rule of law. But neither our history nor Martin’s made-up one promises we’ll win.