Skip to main content

How Alexander the Great Used Genies to Build a Great, Great Wall

What ancient myth can teach us about demonization, xenophobia, and the comforting fiction of a wall.
  • Author:
  • Updated:
gog magog alexander great

16th-century Persian miniature of genies ("jinn"), helping Alexander build the Iron Wall. (Image: Wikimedia Commons)

The scene looks like a Technicolor Mordor. Red and yellow beasts, hunched like men but sporting leopards’ spots and feline tails are baking jet-black bricks. Human masons are working with tools, expressions of worry and focus under their work hats. At the center is something that looks like an albino armadillo, but with horns the color of fire, wearing jewelry of gold and a look of complete exhaustion.

Our scaly white friend is making a black brick wall between two mountains. A kingly man looks on, explaining the scene to two other men whose heads are wreathed in flames. The three are in a tent, enjoying a plate of pomegranates while they discuss the black wall, the white armadillo-ish creature, and the other laborers. The royal is Alexander the Great, as depicted by a Persian miniaturist in the 1500s: The conqueror of Asia, boy genius, and presumed pansexual is overseeing the construction of a magic wall.

Alexander the Great was a historical figure, but just barely. When he died in 323 B.C.E., at the age of 32 and as king of an empire that stretched from modern-day Greece to Pakistan, he was considered by many of his contemporaries as something of a god. In just over three decades of life, Alexander sowed the seeds of a vast legend. The Alexander Romance, a fabulist chronicle of acts both heroic and magical, includes one particularly outlandish bit of history. Alexander, the legend goes, built a wall to keep all of the evil out of the Middle East. This magical wall, built with the help of magical beings, was meant to save man’s order from unspeakable death at the hands of malevolent demons.

If only.


“The Alexander of the Persian romances is much more colorful than his Western counterpart,” explains Minoo Southgate, a professor of English at Baruch College, in a 1977 article. Southgate analyzes the Iskandarnameh (book of Alexander), an 1194 tract that describes the historical king in superhero terms: a peerless warrior and ardent lover of travel and of women. The Persian Alexander visits the Land of Gold, fighting off enormous bees. He marries a pious hermitess, reasoning that it will have him “made in both worlds,” and later adds a fairy princess to his harem. It is all riveting stuff, and as ridiculous as it may read today, one can empathize a bit with the Romance’s pre-modern audience.

Most important for the credibility of the Romance, it had the backing of God. The Qu’ran tells the story of one Dhul-Qarnayn in Sura 18: Dhul-Qarnayn, “the two-horned one,” comes across people in a valley with whom he can barely communicate but who beg him to protect them from Gog and Magog, who are “spoiling the land.” Dhul-Qarnayn builds an iron wall that will keep out Gog and Magog until the end of times—a noble deed attributed by contemporaneous Jewish and Christian sources to Alexander.

The Persian Alexander visits the Land of Gold, fighting off enormous bees. He marries a pious hermitess, reasoning that it will have him “made in both worlds,” and later adds a fairy princess to his harem.

This mysterious horned man who comes into the Qu’ran with moral force is, according to most scholars, Alexander the Great. Muslim Persian writers of the Alexander Romance could point to their hero’s appearance—the equivalent of a guest track—in the holy book.

What’s more, it is difficult even today to comprehend the extent of Alexander’s impact on history. Historians confirm that Alexander defeated Darius III and burned Persepolis to ashes, a ruin that can still be seen today. Silver coins bearing Alexander’s face and cities named in his honor crop up in the most unexpected of places. It seems petty to stand in awe of Alexander’s historical accomplishments but then to scoff at the myths that came in their wake. Alexander’s conquest of Persia came nearly a thousand years before the advent of Islam. That leaves a long time for history, legend, and pure fabrication to mix. The task of trying to sort out which is which deserves no small degree of imagination.


But all this discussion of Alexander’s legendary derring-do prompts the question: Who were Gog and Magog that they could terrify a man as bold as Alexander? What could make a world conqueror go on the defensive? Most keepers of the Romance identify Gog and Magog with a basic inhumanity. A source from the 800s states that they are cannibals; even worse, the two eat puppies and kittens. A modern historian, Adam Silverstein, connects Muslim descriptions of Gog and Magog to the Epic of Gilgamesh, which reminds this reader of Lovecraft’s “Great Old Ones,” who harbored an unfathomable evil.

Think back to that Persian miniature, with its jaguar-people and its shiny armadillo, those flaming heads, and, yes, those ripe pomegranates. Those are the good guys. They are so terrified they are prepared to bunker down until the end of days, to build a wall of iron and coat it with lead, rather than face Gog and Magog. Who are the devils that terrify even Alexander’s own demons and genies?

The Iskandarnameh, which imagines all manner of beings whom Alexander either wooed or pillaged, is uncharacteristically bland in describing the creatures excluded by the wall. The text says they are Russians. This may be a result of what counted for geographical rigor in the 1100s. The Iskandarnameh’s author hailed from a city in what is now Azerbaijan, a few hundred miles southwest of the fortress of Derbent. Sitting high in the Caucasus Mountains, the fortress sealed the Persian-speaking world behind the Caucasus from the vast plains to the north. The Romance attributes the fortress to Alexander (in fact it was built by Persian kings in the sixth century C.E.). Beyond the wall lay the Mongols, who seemed properly chastened. But beyond these horsemen were people who could reputedly defeat Mongols in a land war. In this case it was Russians, but the Iskandarnameh would develop a more universal trope for its iconic terrors: Gog and Magog were the people that the scariest people were afraid of. The pair constituted a sort of eschatological Keyser Soze.


In the centuries that followed, Gog and Magog became political bogeymen. Persian shahs would tell their people that they must keep out the rival Ottomans or scheming Romanovs, lest the old demons return. Gog and Magog had a star turn in the 1970s: As governor of California, Ronald Reagan used these harbingers of the end-times as avatars for Communism. One could argue that once Reagan became president, Star Wars was his wall and the crumbling U.S.S.R. his demon.

Today, of course, there is no shortage of candidates for comparison to Gog and Magog. “Gog and Magog was used in history to describe the forces that have usually caused mass migration,” according to Ali Karjoo-Ravary, a scholar of religious studies at the University of Pennsylvania. “The wall was thus usually identified with something that kept steppe peoples outside of the urban centers” that marked medieval Persia. Karjoo-Ravary’s “steppe peoples” were the nomadic Turkic communities that gradually converted to Islam but continued to flood south into Persia (and later, Anatolia). Karjoo-Ravary admits that most Persians saw these horsemen as the evil itself, but some onlookers were more sympathetic: “another perspective would have seen them as refugees from turmoil on the steppe.”

Gog and Magog could be interpreted as refugees from social strife in a faraway land. In this understanding, it’s not their eating habits or military superiority that gives Alexander reason to fear, but their threatening inertia. Alexander and the medieval Persians who studied him feared Gog and Magog as one domino fears its teetering neighbor. In that way, the wall is more of a physical than political solution. It’s a way to keep the bad things over there from becoming bad things over here.

It is this same threat—in this case, the specter of refugees of the Middle East—that Hungary’s prime minister is seeking to stave off by building a wall, arguing that his country has “no option but to defend our borders” from the refugees and migrants pouring into Europe. For millennia, politicians have built walls to keep out a cresting mass of foreign bodies; once the walls are built, it is easy to hide behind them and avoid asking difficult questions about that cresting mass.


Demons and monsters—or, rather, the creatures that we call demons and monsters—are most frightening when we construe them as a horde, a headless mass with no individual appeal to empathy. Syrians became difficult to demonize only after the body of Aylan Kurdi, a child, was photographed on an otherwise idyllic beach. A politician can’t portray Mexican Americans as monsters if he must rely on their votes. But the forces that push immigrants into Europe or the United States are complex, and all the more terrifying for it. Alexander the Great, who had the ingenuity to cut the Gordian Knot and the temerity to convince an Afghan warlord that Macedonian soldiers could fly, is famous in Persian sources for taking one look at the problem of massive population displacement and saying, essentially, “not today.”

Which is to say that, in Alexander’s time and today, a wall remains a cop-out. If legend is to be believed, Alexander’s wall will one day be defeated by a common fox. That fox will ally with Gog and Magog, then send the armies of darkness through the gates. Alexander had an army of demons at his disposal, yet even his wall is doomed to failure. It is difficult to imagine the somewhat less-ingenious, somewhat less-temeritous politicians of today succeeding where he will not.

Ali Karjoo-Ravary, whose work focuses on Sufism (mystical Islam), also points out that Gog and Magog can be interpreted as analogs for human tendencies. That is, the bottomless depths of evil may not be kitten-eating armies or even Communists but rather a lack of belief or empathy. One could tease this reasoning out historically and argue that the fear of Mongol hordes or Syrian refugees is not the dread of political evil, but an unwillingness to confront a social problem.

This is, perhaps, an argument better left to theologians than to journalists. But it is interesting to imagine that Alexander was most terrified not of an invincible army, but of a polity that didn’t believe the legend with which he had surrounded himself. Maybe the grotesque demons that come out around Halloween aren’t humanity’s worst fears realized, but rather our allies in deception in trying to protect us from confronting social realities that we really fear the most.


Demon Week is Pacific Standard's series of essays exploring all things diabolical—from devils to dogs, monsters to mental illness.