Essays / Folklore and history
Investigating Ancient Folklore: Hidden Kingdoms, Enclosed Populations, Iron Gates, and the Jinn
Mountain enclosures, hidden kingdoms, iron gates, and the stories preserved around them.
Sources and references ↓In my previous posts, I explored the possibility that Ya'juj and Ma'juj might be confined within an extensive mountain cave system, with Dhul-Qarnayn's barrier sealing an accessible entrance. What began as a geographical hypothesis eventually led me to examine the narrative structure of Surah Al-Kahf and the fascinating parallels between its stories.
I subsequently turned my attention toward geography, particularly Turkiye and its mountainous regions, extensive underground settlements, and natural cave formations. I wanted to understand whether the kind of environment I had imagined was physically possible and whether historical accounts might contain geographical information that modern investigations could help us examine. However, something unexpected happened as I continued researching. I began encountering folklore describing entire populations enclosed within mountains, hidden kingdoms beneath the earth, extraordinary iron barriers, concealed entrances, and people whose eventual emergence would have tremendous consequences for the outside world.
Some of these accounts explicitly concern Gog and Magog. Others belong to entirely different cultural traditions, with their own characters, histories, and meanings. I found myself increasingly interested in the stories themselves. I wanted to understand what each tradition actually described, how far back it could be traced, and what geographical or historical details might have been preserved within it.
What follows are some of the most interesting accounts I encountered.
The Armenian Legend: A Population Enclosed Within Mountains
One of my first discoveries was a Syriac text known as the Edessene Apocalyptic Fragment, generally dated to the late seventh century. The account describes Alexander gathering Gog and Magog, along with other populations, and taking them into the interior of a mountainous region. He then prays for the mountains to move together, leaving a narrow opening approximately twenty cubits wide. The remaining passage is sealed, and the narrative anticipates a future time when the gates of Armenia will open and the enclosed populations will emerge.
What particularly interested me was the arrangement of the enclosure. The mountains themselves provide the confinement, while the constructed barrier is responsible for closing the remaining opening. This resembles the geographical arrangement I had been considering independently. If mountains already enclose an extensive region, a relatively limited constructed barrier could theoretically control access to a much larger area.
The Syriac account introduces an additional extraordinary element by describing the mountains themselves moving together through divine intervention. The description also raises interesting questions about what the ancient author understood by the "interior" of the mountains. Was it an enclosed valley, an isolated region beyond the mountain formations, or an inaccessible space imagined within the mountains themselves?
The surviving account belongs to apocalyptic literature, where geography, prophecy, and extraordinary events frequently appear together. Its late-seventh-century dating also places it after the Qur'anic revelation, making the historical development of the tradition an interesting subject in its own right. What fascinated me was that a medieval account described such a specific arrangement: a population enclosed by mountains, a narrow remaining passage, and a barrier whose eventual opening would bring that population back into contact with the outside world.
Ergenekon: The People Who Escaped Through an Iron Mountain
The next account that caught my attention was the Turkic-Mongol legend of Ergenekon. According to versions of this tradition, a people suffer a devastating defeat at the hands of their enemies. A small group of survivors escapes and eventually discovers a secluded valley surrounded by impassable mountains. The valley provides everything they need to survive, including pastureland, water, and sufficient resources to establish a new community. Over the generations, the survivors multiply.
After a period traditionally described as 400 years, their population has grown so large that the valley can no longer comfortably accommodate them. They wish to leave, but the mountains prevent their departure. Eventually, a blacksmith recognizes that part of the surrounding mountain contains iron ore. The people gather enormous quantities of fuel, build fires, and use bellows to produce sufficient heat to melt the iron-bearing formation. An opening is created, allowing the population to emerge from the valley and return to the outside world.
What fascinated me was the relationship between the enclosure, the passage of time, and iron. The mountains provide an environment capable of supporting the population for centuries, but the same mountains eventually become an obstacle to their departure. Their confinement is initially a form of refuge. Later, the enclosure becomes something they must overcome.
The blacksmith's discovery is particularly interesting because the solution involves understanding the material properties of the mountain itself. Iron, heat, and human ingenuity become the means of creating an exit. There is an intriguing contrast with the account of Dhul-Qarnayn, where iron is used to construct a barrier rather than overcome one. Both narratives involve mountainous enclosures, iron, separation, and eventual emergence, although their circumstances and purposes differ.
I also found myself thinking about the extraordinary passage of time. Four centuries pass within the enclosed region, and the population that eventually emerges is composed of descendants of those who originally entered. The story presents a community developing an entire history within a geographical environment separated from the outside world. That, to me, is one of the most interesting aspects of Ergenekon.
An Abbasid Expedition to the Barrier
Perhaps the most unexpected discovery was an account describing an expedition specifically undertaken to inspect the barrier of Ya'juj and Ma'juj. During the reign of the Abbasid caliph al-Wathiq, who ruled from 842 to 847 CE, a man named Sallam al-Tarjuman reportedly undertook a journey to locate and examine the barrier. The account is preserved in the geographical writings of Ibn Khordadbeh.
According to the narrative, the caliph experienced a disturbing dream in which the barrier had been breached. He subsequently commissioned Sallam to investigate its condition. The reported journey lasted approximately 28 months and involved travel through remote territories before Sallam eventually returned to Samarra. What made the account particularly memorable was the detailed description of the supposed barrier.
The narrative describes an enormous iron structure, fortified surroundings, substantial locking mechanisms, and a community whose responsibility for guarding the barrier had supposedly been inherited across generations. The guards were said to maintain a routine involving the gate. In the account, the commander approaches the structure and strikes its bolt before listening for sounds from the other side. The noises supposedly produced by the enclosed population are compared to those of a swarm of insects. The report even claims that Sallam returned with a fragment of the barrier.
I found the description of the guards especially interesting. The account presents a community with an inherited responsibility to monitor an ancient structure. The barrier is not merely a historical monument. Within the narrative, it remains an active boundary separating two populations. The detail about striking the gate and listening for a response gives the account an almost observational quality, as though the guards were conducting a routine inspection to determine whether the population beyond it remained present.
The historical reliability of the expedition's extraordinary descriptions remains debated. The account belongs to medieval geographical literature, where travel reports and legendary material can appear together. Nevertheless, the narrative demonstrates that locating and inspecting the barrier was a subject of considerable interest within the medieval Islamic world. What particularly interests me now is whether the account's geographical descriptions can be reconstructed independently. Sallam's reported route, the peoples he encountered, and the physical features described along the journey might reveal how medieval geographers understood the location of the barrier.
Shahmaran: The Hidden Serpent Kingdom Beneath the Earth
This was one of the most unusual traditions I encountered, and it led me toward a different line of thought altogether. Shahmaran is a legendary being associated particularly with Tarsus and Mardin in Turkiye, although variations of the story exist across a much wider region. She is traditionally depicted as a supernatural figure with the upper body of a woman and the lower body of a serpent, and her name is associated with the Persian expression for the ruler of snakes.
According to one version of the legend, a young man named Cemshab discovers a well or cave containing honey while working with his companions. They lower him inside to collect the honey, but once they have obtained what they want, they abandon him. Trapped underground, Cemshab searches desperately for a way out. Eventually, he notices a small opening through which light is passing. He enlarges the opening and discovers an extraordinary environment beyond it.
Instead of finding another narrow passage, he emerges into a magnificent subterranean garden containing vegetation, water, and an entire population of intelligent serpents. This is the kingdom of Shahmaran. The serpents possess their own society and acknowledge Shahmaran as their ruler. She welcomes Cemshab, and he remains within the kingdom for years, developing a close relationship with her. Eventually, he begins to miss his family and asks to return to the surface. Shahmaran reluctantly agrees, but requires him to promise that he will never reveal her location.
Cemshab returns to human society and initially preserves the secret. Years later, the ruler becomes gravely ill, and the authorities are informed that Shahmaran possesses the cure. Through a series of events, Cemshab's knowledge of the hidden kingdom is discovered, and he is compelled to reveal its location. Shahmaran is brought out and killed. Before her death, she provides instructions concerning the preparation of her remains, leading to the death of the wicked vizier, the recovery of the ruler, and Cemshab's acquisition of extraordinary knowledge.
The legend then introduces another remarkable element. Shahmaran's serpents remain unaware that their queen has been killed. According to one tradition, they believe she is attending a wedding, and the sound of drums continues to reassure them that the celebration has not ended. When the drums eventually fall silent, they will discover that Shahmaran is dead. The serpents will then emerge and descend upon Tarsus, bringing destruction to the city. Some versions associate this eventual emergence with the end of time.
Several aspects of this story fascinated me. The physical arrangement of the underground kingdom resembles an extensive concealed environment accessible through a relatively small opening. Its inhabitants possess intelligence, communication, social organization, and extraordinary knowledge. The kingdom exists largely apart from human society, and knowledge of its entrance is deliberately concealed. The story also contains the expectation that its inhabitants will eventually emerge into the human world.
Could the Serpent Kingdom Reflect Ideas About the Jinn?
The serpents themselves prompted an entirely different thought. As I examined the Shahmaran legend, I began wondering whether its supernatural serpents might have some relationship to cultural traditions concerning the jinn. The inhabitants are intelligent beings living in a concealed environment, largely separated from ordinary human society. They possess their own ruler, communicate with people, and have access to extraordinary knowledge. A secluded underground kingdom seemed like a conceivable setting for beings such as the jinn, particularly within folklore that portrays them as inhabiting hidden or inaccessible places.
The serpent imagery made the comparison even more interesting. In Sahih Muslim 2236c, the Prophet Muhammad (SAW) discusses jinn in Madinah and provides instructions concerning certain snakes found within houses. The narration establishes an association between jinn and serpentine appearances in that context.
That made me wonder whether older communities might sometimes have represented supernatural beings through the familiar forms of animals, particularly serpents. Could the Shahmaran tradition contain elements influenced by beliefs about jinn? Could the serpents represent an older mythological category of supernatural beings that later interacted with Islamic traditions? Perhaps the different versions of Shahmaran could help us understand how the story developed as it passed between Persian, Kurdish, Turkish, and other communities.
I would be interested in examining the terminology used in older versions of the story, particularly whether the inhabitants are consistently called Maran, described simply as serpents, or identified using terms associated with other supernatural beings. This is a separate folklore question that I found intriguing in its own right.
Yilankale: The Snake Castle
The Shahmaran investigation also led me to Yilankale, or Snake Castle, in the Adana region. The fortress stands on a rocky hill near the Ceyhan River and has its own historical association with Shahmaran. A local tradition describes numerous serpents inhabiting the castle and being sustained by milk. According to the story, their milk supply will eventually run out. When that happens, the serpents will leave the fortress, descend upon the nearby town of Misis, and destroy its inhabitants.
This creates an interesting variation within the Shahmaran tradition. The underground kingdom version describes a concealed subterranean population whose emergence is connected with the discovery of their queen's death. The castle version places the population within a fortified structure, with their emergence connected to the exhaustion of their food supply. The two versions preserve related ideas while presenting different explanations for why the inhabitants remain enclosed and what will eventually cause them to emerge. It would be interesting to trace how these variations developed and whether the different geographical settings influenced the stories told by the communities living nearby.
Mount Cudi: The Gate of Gabriel and the Devil's Hollow
Returning to southeastern Turkiye, I investigated the folklore associated with Mount Cudi. The mountain is strongly associated with Nuh (AS) and the Ark in local religious traditions. Historical accounts describe places of pilgrimage, traditional routes, and distinctive geographical features connected with the story of the Flood.
One particularly interesting location is known as Deriye Cebrail, or the Gate of Gabriel. The passage consists of a narrow opening between large rocks that provides access to a broader mountain plateau. Local traditions associate the passage with Gabriel visiting the mountain and, in another account, with the Ark passing through the opening before reaching its resting place.
The physical arrangement caught my attention because a narrow opening leads into a considerably larger environment beyond it. Someone approaching the mountain from outside might not immediately appreciate the extent of the plateau accessible through the passage. Other features associated with the mountain include places known as the Devil's Hollow and Hatice's Cave. Nuriye Deniz's research on the folk beliefs surrounding Mount Cudi and the Flood documents these named locations and draws upon local traditions.
I would like to learn more about the stories associated with these particular places, especially the origins of their names and how their meanings have changed across generations. The name Devil's Hollow is particularly intriguing because I have not yet established the specific tradition responsible for it. Mount Cudi demonstrates how a landscape can accumulate layers of religious and cultural memory, with different features becoming associated with different figures, events, and beliefs.
The Stone Gate of Van: A Doorway That Opens Once a Year
Another remarkable legend comes from Van. Meher Kapisi, also known as the Stone Gate, is an ancient Urartian rock monument containing a carved niche and inscriptions. Its physical appearance resembles a doorway, and local folklore gives it an extraordinary property.
According to the legend, the stone gate opens once every year for a brief period. When it opens, it reveals a hidden chamber containing treasure. One day, a shepherd girl happens to be nearby when the entrance opens. She enters the chamber and begins collecting the treasure, but becomes so absorbed in gathering it that she loses track of time. The doorway closes, trapping her inside.
When the villagers search for her, they discover that her tracks lead toward the stone monument, but they cannot open it. They must wait until the following year. When the gate eventually opens again, they discover the girl inside, turned to stone.
I found this story fascinating because of its treatment of time and access. The hidden chamber is not described as permanently inaccessible. Instead, its entrance operates according to an extraordinary schedule that people cannot control. The shepherd girl enters willingly but becomes trapped because she misunderstands the limits of her opportunity. The treasure also plays an interesting role, because her desire to collect as much as possible prevents her from recognizing the approaching danger.
The physical monument is a carved religious niche rather than a documented entrance to an underground chamber, but the legend transforms its doorway-like appearance into an extraordinary story about concealment, temptation, time, and confinement. It is a particularly interesting example of how the appearance of a physical structure can inspire a much larger narrative.
The Caucasian Gates: Where History and Legend Meet
The investigation eventually took me beyond Turkiye and into the Caucasus. Two locations repeatedly associated with the wider traditions concerning Alexander's gates are Darial Gorge and Derbent. Darial is a narrow mountain passage through the Greater Caucasus, while Derbent controls a corridor between the mountains and the Caspian Sea.
An account written by Pliny the Elder in the first century CE describes the Caucasian Gates as a natural passage through the mountains containing iron-reinforced gates, a river flowing beneath them, and a fortress guarding the approach. I found the description interesting because it demonstrates how natural geography and constructed defenses were combined in antiquity. The mountains formed the principal obstacle, while the gates controlled movement through the remaining passage.
Both Darial and Derbent possess documented histories of fortification, although their surviving defensive structures developed under different rulers and at different times. Their later associations with Alexander's barrier illustrate how historical geographical features could become incorporated into broader literary and religious traditions.
What interests me is the relationship between the physical locations and the stories subsequently attached to them. I would like to understand whether older descriptions of these mountain passages influenced the development of the gate traditions, or whether existing traditions encouraged later writers to identify particular geographical landmarks with them. The connection between geography and historical storytelling is especially interesting when the landscape already contains extraordinary natural features.
A Brief Note on Geography and Restricted Regions
Alongside the folklore, I also investigated the geological conditions of Turkiye and the surrounding regions. The underground cities of Cappadocia demonstrate historical subterranean habitation, while natural cave systems in the Taurus Mountains demonstrate how extensive underground environments can develop through water erosion and geological processes.
I also examined government restrictions covering mountainous areas, including historical special security zones around Mount Cudi and Mount Gabar. My interest is in comparing documented access restrictions with suitable geological formations and older traditions associated with particular locations.
I intend to explore the geographical evidence, underground cave networks, ancient drainage systems, and government restrictions in a separate post. For now, I want to keep the focus on the folklore and historical accounts that emerged during this investigation.
What I Find Most Fascinating About These Discoveries
Looking back over the different traditions, I am struck by how frequently certain narrative elements recur. The Armenian account describes Gog and Magog being enclosed within mountains, with the remaining passage sealed. Ergenekon describes a population that survives within a mountain valley for centuries before melting an iron-bearing obstruction and creating an exit. The account of Sallam al-Tarjuman describes a guarded iron structure and a population believed to remain beyond it. Shahmaran introduces an underground kingdom inhabited by intelligent supernatural serpents, with knowledge of the entrance carefully concealed. The Stone Gate of Van describes a hidden chamber that becomes accessible only at a particular time, while the Caucasian Gates demonstrate how actual mountain passages became associated with traditions about extraordinary barriers.
Each story has its own historical and cultural setting, and each raises different questions. Ergenekon is particularly interesting for its treatment of population growth, survival, and escape. Shahmaran introduces questions about supernatural beings, concealed knowledge, and the relationship between humans and the unseen. The Stone Gate of Van explores the consequences of entering an extraordinary place without understanding the conditions of departure. The Armenian account and the expedition of Sallam are especially interesting because they explicitly concern Gog and Magog and preserve detailed descriptions of their supposed confinement.
What stands out to me is the recurring relationship between geography and separation. Mountains, caves, fortresses, and gateways become boundaries between different worlds. Sometimes those boundaries offer protection. Sometimes they prevent a population from leaving. In other accounts, they conceal extraordinary knowledge, supernatural beings, or treasures from ordinary human experience.
The passage of time is another interesting feature. Some populations remain separated for centuries, while other stories describe entrances that open only at particular times or extraordinary conditions that must be fulfilled before an enclosed space becomes accessible. Iron also recurs in particularly interesting ways. In one narrative, it is used to construct a barrier. In another, it is melted to create an opening. Elsewhere, iron-reinforced gates control access through formidable mountain passages.
These similarities make me curious about the movement of stories between different communities. I would like to investigate whether certain narrative elements developed independently, whether they were transmitted through trade and migration, or whether later writers incorporated familiar geographical features into older traditions.
The Shahmaran legend also opened another avenue of thought concerning supernatural folklore and beliefs about the jinn, particularly the serpent imagery and the idea of intelligent beings inhabiting concealed environments. I find all these traditions fascinating in their own right.
What began as a question about the possible geography of Ya'juj and Ma'juj has introduced me to a much wider collection of stories about hidden kingdoms, enclosed populations, ancient gateways, supernatural beings, and extraordinary passages through mountains. I want to continue examining these accounts through their earliest available sources, considering their historical development, the communities that preserved them, and the landscapes associated with them.
My next post will return to the geographical investigation, including Turkiye's natural cave systems, the historical geography of the Armenian Highlands and Caucasus, and the mountainous regions where access has been restricted. For now, the folklore itself has given me plenty to think about.
Sources and references
Links to the texts, studies, and recorded traditions discussed above. The comparisons and questions in this essay are my own.
Early accounts and comparative studies
- Edessene Apocalyptic Fragment — text and discussion in a University of Oxford thesis
- Ergenekon tradition and its Turkish-Mongol transmission — Vakanuvis
- Sallam al-Tarjuman and Ibn Khordadbeh — Mapping Frontiers Across Medieval Islam
- Pliny, Natural History, Book VI, chapter 12 — the Caucasian Gates
- Derbent and the Caucasian Gates — Encyclopaedia Iranica
Folklore, places, and hadith
- Shahmaran traditions of Tarsus — Cukurova University folklore study
- Yilankale and Misis serpent tradition — Adana Provincial Directorate of Culture and Tourism
- Shahmaran and the wedding drums — KURE Encyclopedia
- Sahih Muslim 2236c — jinn in Madinah and household snakes
- Mount Cudi and Noah’s Flood in Sirnak folk beliefs — Nuriye Deniz
- Taskapi (Meher Kapisi) and the shepherd girl — Turkish Culture Portal
Comments
Loading comments…
Join the conversation
Your comment will appear after it has been reviewed.