When the author of Genesis included a certain “Magog” among the descendants of Noah, he didn’t choose to elaborate on that particular name. Magog appeared only as an entry on a list, no different from any of the other obscure individuals who typically populate biblical genealogies, tempting us to skip ahead to the more interesting sections. Was it Noah’s fault that one of his grandsons hadn’t amounted to much? However, scripture abhors a vacuum, and by the time the prophet Ezekiel introduced “Gog from Magog” in the early sixth century BC, Magog had expanded his reputation considerably, having apparently spawned a warrior who was destined to destroy Israel and do battle with God. According to Ezekiel, Gog would someday come from the north with a great horde of horsemen, like a cloud covering the earth. He would “go up against the land of unwalled villages . . . fall upon the quiet people who live in safety, all of them living without walls, and having no bars or gates . . . to seize spoil and carry off plunder.”
Clearly, the Apocalypse was no time to live in an unwalled village.
As for the horsemen from the north, they had already arrived, although not yet in cloudlike numbers. A few decades before Ezekiel’s birth, invaders from the steppe had ridden across the Assyrian Empire all the way to Egypt. The prophet was still a child when the horsemen culminated their adventure by sacking the Assyrian capital of Nineveh in 612 BC. Years later, the historical shock of that episode still reverberated in his text. Ezekiel translated the events of his childhood into disturbing visions that profoundly influenced later authors. Gog from Magog metamorphosed inexplicably into Gog and Magog, and the ominous pair subsequently began appearing variously as individuals, lands, or peoples in rabbinical literature and Jewish apocryphal works. The decisive moment for this growing legend occurred in the first century AD, when the Jewish historian Josephus equated Magogites with Scythians, the Greek term for the horsemen of the steppe. Josephus then made an assertion that has echoed throughout world literature ever since: the Scythians, he said, had raided and plundered the kingdom of the Medes after a king near the Caspian Sea had allowed them to pass through the iron gates that Alexander had built.
* * *
The legends of Alexander on the one hand and the Bible on the other had long fought over the same turf. The merger of the two traditions, now united by the notion that Alexander had constructed an iron barrier against the pseudobiblical Magogites, probably occurred before Josephus put it in writing. Civilized peoples had learned they needed a hero, and Alexander, in much-revised form barely resembling the actual man, fit the suit. But how could the mortal Alexander have hoped to defend civilization for all time? Only by building a wall, apparently.
The tale of Alexander’s wall would expand dramatically after its first timid appearance in the writings of Josephus. In the 390s AD, Huns rode through the Caucasus Mountains and launched devastating raids into Mesopotamia and Syria. In the aftermath of this catastrophe—and the equally catastrophic appearance of Huns on the edges of the Roman Empire—Alexander’s biographers began seriously embroidering their accounts. A messianic aura soon shone over the putative defender of civilization. In an anonymous Christian variation of the popular Alexander Romance, Alexander is depicted with divine horns. Gog and Magog, meanwhile, have become kings of the Huns, endowed with all the standard characteristics of steppe horsemen. Like most of the feared barbarians of antiquity, they are given blue eyes and red hair. Their armies arrive on horseback, Amazonian women at their side, towering over civilized folk. Their customs are abhorrent. They are unclean and clad only in skin. They feast on corpses and blood. Upon receiving reports of the beastly duo, Alexander commands a great iron door be built in the Caucasus Mountains. Three thousand blacksmiths and three thousand brass workers toil on the gate. With its completion, Alexander has shut out the North Wind along with the Huns. On the gate, he inscribes a prophecy: In 826 years, his wall will fail and the Huns will conquer both Persia and Rome. After 940 years, the forces of God, civilization, and Alexander will finally triumph over the Huns in a great apocalyptic war.
The tale of Alexander’s apocalyptic struggle against barbarian horsemen threatening to overwhelm civilization spread to every corner of the Old World, gradually becoming one of the most widely told stories in all of world literature. In the Quran, Alexander became Dhul-Qarnayn, “the two-horned one,” who builds an iron barrier against Yajuj and Majuj (Gog and Magog) in the space between two mountains. Persian artists depicted genies assisting Alexander in the construction of the wall. So great was the fascination with Alexander’s Gates that a ninth-century caliph once dispatched a scholar all the way to northern China on a quest for the mythical barrier. Sallam the Interpreter traveled three thousand miles before he reached China’s walls, and when he saw them, he concluded that Alexander’s work remained intact. The myth of Alexander’s Gates also made its mark in medieval European literature. European geographers, relying primarily on imagination and rumor, hastened to locate the structure. Around 1300, the Hereford Map authoritatively described the land beyond the Gates, where “everything is horrible, more than believed,” and the inhabitants, who will escape their confinement in the age of the Antichrist, are the cannibalistic sons of Cain. Today, a rousing interest in Dhul-Qarnayn, Gog and Magog, and Alexander’s Gates still animates pockets of the internet.
* * *
The myths of Alexander’s Gates arose out of a protracted period in the history of civilization when steppe horsemen seemed the very embodiment of the Apocalypse. No city, no matter how magnificent its ramparts, could fend off such a threat. Even the great empires shuddered. The world outside their borders had become, for them, a vast no-go zone. From roughly the time of China’s First Emperor to that of the Kievan prince Vladimir I (r. 980–1015), a span of over a thousand years, the great Eurasian states from China to Rome focused mostly on defense. They repeatedly reined in their ambitions and retreated behind massive border walls.
How great was the fear of the nomadic horsemen of the Eurasian Steppe? Here it would be appropriate to cite an impressive fact: the total length of all the walls built to defend against the steppe peoples. This number cannot be known. Few ancient long walls have survived to any appreciable degree. Those that have endured are often unidentifiable or known only to locals who themselves misunderstand the ruins on their land. Archaeological work has been desultory, and interpretations are frequently distorted by feelings of national pride. Yet the sources we do possess permit us to make a rather astonishing statement about the scale of the defensive efforts: virtually every potential opening along the roughly five-thousand-mile border separating the Eurasian Steppe to the north and the zone of urban civilization to the south was, at one time or another, walled off. And even this statement fails to account for the twists and turns of geography that necessitated those walls extend for more than five thousand miles. Of course, we must make some exceptions. Where the coastlines of the Black Sea and the Caspian Sea bound the steppe, there was no need for walls. Likewise, the desolate highlands of Tibet and certain desert regions didn’t require fortifications. Everywhere else, however, the traveling horseman would have found his way south blocked by high walls guarded by imperial soldiers. The Two-Horned One had done his work; Gog and Magog were shut out.
The barriers of the Great Age of Walls rank among the most important structures ever built. They fostered the development of those three vast regions that would one day become China, the Islamic world, and the West. They shaped interactions with steppe peoples, who would affect the historical trajectories of all three regions. They did not, however, divide the civilizations of Eurasia, which never built walls against one another. In fact, the story of the age begins, quite unexpectedly, with the construction of walls that were designed to encourage reaching out, rather than turning inward.