QURANIC HISTORY
Dhul-Qarnayn's Wall Against Gog and Magog: The End-Times Story in the Quran
Dhul-Qarnayn the righteous king who built an iron-and-copper wall to seal Gog and Magog (Yajuj wa Majuj) until the Last Day.
📖 Surah Al-Kahf (18:83-99)
The verse
وَيَسْـَٔلُونَكَ عَن ذِى الْقَرْنَيْنِ ۖ قُلْ سَأَتْلُوا۟ عَلَيْكُم مِّنْهُ ذِكْرًا ٨٣ إِنَّا مَكَّنَّا لَهُۥ فِى الْأَرْضِ وَءَاتَيْنَـٰهُ مِن كُلِّ شَىْءٍۢ سَبَبًۭا ٨٤ فَأَتْبَعَ سَبَبًا ٨٥ حَتَّىٰٓ إِذَا بَلَغَ مَغْرِبَ ٱلشَّمْسِ وَجَدَهَا تَغْرُبُ فِى عَيْنٍ حَمِئَةٍۢ وَوَجَدَ عِندَهَا قَوْمًۭا ۖ قُلْنَا يَـٰذَا ٱلْقَرْنَيْنِ إِمَّآ أَن تُعَذِّبَ وَإِمَّآ أَن تَتَّخِذَ فِيهِمْ حُسْنًۭا ٨٦ قَالَ أَمَّا مَن ظَلَمَ فَسَوْفَ نُعَذِّبُهُۥ ثُمَّ يُرَدُّ إِلَىٰ رَبِّهِۦ فَيُعَذِّبُهُۥ عَذَابًۭا نُّكْرًۭا ٨٧ وَأَمَّا مَنْ ءَامَنَ وَعَمِلَ صَـٰلِحًۭا فَلَهُۥ جَزَآءً ٱلْحُسْنَىٰ ۖ وَسَنَقُولُ لَهُۥ مِنْ أَمْرِنَا يُسْرًۭا ٨٨ ثُمَّ أَتْبَعَ سَبَبًا ٨٩ حَتَّىٰٓ إِذَا بَلَغَ مَطْلِعَ ٱلشَّمْسِ وَجَدَهَا تَطْلُعُ عَلَىٰ قَوْمٍۢ لَّمْ نَجْعَل لَّهُم مِّن دُونِهَا سِتْرًۭا ٩٠ كَذَٰلِكَ وَقَدْ أَحَطْنَا بِمَا لَدَيْهِ خُبْرًۭا ٩١ ثُمَّ أَتْبَعَ سَبَبًا ٩٢ حَتَّىٰٓ إِذَا بَلَغَ بَيْنَ ٱلسَّدَّيْنِ وَجَدَ مِن دُونِهِمَا قَوْمًۭا لَّا يَكَادُونَ يَفْقَهُونَ قَوْلًۭا ٩٣ قَالُوا۟ يَـٰذَا ٱلْقَرْنَيْنِ إِنَّ يَأْجُوجَ وَمَأْجُوجَ مُفْسِدُونَ فِى ٱلْأَرْضِ فَهَلْ نَجْعَلُ لَكَ خَرْجًا عَلَىٰٓ أَن تَجْعَلَ بَيْنَنَا وَبَيْنَهُمْ سَدًّۭا ٩٤ قَالَ مَا مَكَّنِّى فِيهِ رَبِّى خَيْرٌۭ فَأَعِينُونِى بِقُوَّةٍ أَجْعَلْ بَيْنَكُمْ وَبَيْنَهُمْ رَدْمًا ٩٥ ءَاتُونِى زُبَرَ ٱلْحَدِيدِ ۖ حَتَّىٰٓ إِذَا سَاوَىٰ بَيْنَ ٱلصَّدَفَيْنِ قَالَ ٱنفُخُوا۟ ۖ حَتَّىٰٓ إِذَا جَعَلَهُۥ نَارًۭا قَالَ ءَاتُونِىٓ أُفْرِغْ عَلَيْهِ قِطْرًۭا ٩٦ فَمَا ٱسْطَـٰعُوٓا۟ أَن يَظْهَرُوهُ وَمَا ٱسْتَطَـٰعُوا۟ لَهُۥ نَقْبًۭا ٩٧ قَالَ هَـٰذَا رَحْمَةٌۭ مِّن رَّبِّى ۖ فَإِذَا جَآءَ وَعْدُ رَبِّى جَعَلَهُۥ دَكَّآءَ ۖ وَكَانَ وَعْدُ رَبِّى حَقًّۭا ٩٨ ۞ وَتَرَكْنَا بَعْضَهُمْ يَوْمَئِذٍۢ يَمُوجُ فِى بَعْضٍۢ ۖ وَنُفِخَ فِى ٱلصُّورِ فَجَمَعْنَـٰهُمْ جَمْعًۭا ٩٩
And they ask you, [O Muhammad], about Dhul-Qarnayn. Say, "I will recite to you about him a report." (18:83) Indeed We established him upon the earth, and We gave him to everything a way [i.e., means]. (18:84) So he followed a way (18:85) Until, when he reached the setting of the sun, he found it [as if] setting in a spring of dark mud, and he found near it a people. Allah said, "O Dhul-Qarnayn, either you punish [them] or else adopt among them [a way of] goodness." (18:86) He said, "As for one who wrongs, we will punish him. Then he will be returned to his Lord, and He will punish him with a terrible punishment. (18:87) But as for one who believes and does righteousness, he will have a reward of Paradise, and we will speak to him from our command with ease." (18:88) Then he followed a way (18:89) Until, when he came to the rising of the sun, he found it rising on a people for whom We had not made against it any shield. (18:90) Thus. And We had encompassed [all] that he had in knowledge. (18:91) Then he followed a way (18:92) Until, when he reached [a pass] between two mountains, he found beside them a people who could hardly understand [his] speech. (18:93) They said, "O Dhul-Qarnayn, indeed Gog and Magog are [great] corrupters in the land. So may we assign for you an expenditure that you might make between us and them a barrier?" (18:94) He said, "That in which my Lord has established me is better [than what you offer], but assist me with strength; I will make between you and them a dam. (18:95) Bring me sheets of iron" - until, when he had leveled [them] between the two mountain walls, he said, "Blow [with bellows]," until when he had made it [like] fire, he said, "Bring me, that I may pour over it molten copper." (18:96) So Gog and Magog were unable to pass over it, nor were they able [to effect] in it any penetration. (18:97) [Dhul-Qarnayn] said, "This is a mercy from my Lord; but when the promise of my Lord comes, He will make it level, and ever is the promise of my Lord true." (18:98) And We will leave them that day surging over each other, and [then] the Horn will be blown, and We will assemble them in [one] assembly. (18:99)
In Surah Al-Kahf, these verses form a profound narrative revealed to Prophet Muhammad ﷺ in response to questions posed by the Quraysh, testing his prophethood. They recount the journeys of Dhul-Qarnayn, a righteous ruler, and his encounters, culminating in the construction of a barrier against the tribes of Gog and Magog, symbolising divine mercy and the inevitability of the Day of Judgement.
The setting
The story of Dhul-Qarnayn unfolds within the broader tapestry of Surah Al-Kahf, a chapter revealed in Makkah during a time when Prophet Muhammad ﷺ faced intense opposition from the Quraysh. Historical accounts suggest that the Jewish scholars in Madinah prompted the Quraysh to quiz the Prophet ﷺ on three matters: the People of the Cave, the Spirit, and Dhul-Qarnayn. This was intended to challenge his knowledge, as only a true prophet could provide accurate details on such ancient tales. Allah SWT responded through the Quran, providing guidance that not only answered the queries but also offered timeless lessons on faith, patience, and the signs of the end times.
In the Quranic context, Surah Al-Kahf is renowned for its stories that serve as protection against the trials of the Dajjal, as mentioned in authentic hadith. The narrative of Dhul-Qarnayn appears towards the end of the surah, following the stories of the Sleepers of the Cave, the owner of two gardens, and Musa (AS) with Khidr. Each tale emphasises reliance on Allah SWT, the fleeting nature of worldly power, and the importance of knowledge and justice. Dhul-Qarnayn's account specifically highlights themes of leadership, mercy, and preparation for eschatological events, tying into Islamic beliefs about the Last Day.
Historically, the identity of Dhul-Qarnayn has intrigued scholars. The name "Dhul-Qarnayn," meaning "the one with two horns" or "the one of two epochs," is not explicitly linked to a specific figure in the Quran, allowing for various interpretations. Some classical commentators associate him with Alexander the Great, known for his vast conquests and a horned depiction in ancient art, though this is debated due to Alexander's polytheistic background conflicting with the Quran's portrayal of Dhul-Qarnayn as a monotheistic believer. Others suggest he could be Cyrus the Great, the Persian king who liberated the Jews from Babylonian captivity and is praised in biblical texts for his justice and belief in one God. Archaeological evidence of Cyrus's cylinder seal and his empire's expanse from east to west aligns with the Quranic description of a ruler empowered by Allah SWT to traverse the earth.
The setting also evokes the ancient world, where vast empires clashed, and tribes like Gog and Magog—possibly referring to nomadic hordes such as the Scythians or Mongols—posed threats to settled civilisations. In Islamic eschatology, Gog and Magog (Yajuj wa Majuj) are prophesied to emerge near the end of time, causing widespread corruption before being defeated by divine intervention. The Quran's mention of their containment behind a wall until the promise of Allah SWT comes to pass underscores the theme of divine timing and the ultimate triumph of good over chaos. This narrative, set against a backdrop of human vulnerability and divine protection, invites reflection on how ancient stories continue to resonate in understanding our place in the cosmic order.
The story
The Quran introduces Dhul-Qarnayn as a figure whom Allah SWT had firmly established on earth, granting him the means to achieve every purpose. With this divine empowerment, he embarked on journeys that showcased his wisdom, justice, and piety. His first expedition led him westward until he reached the setting place of the sun, where he found it appearing to sink into a murky spring. There, he encountered a people living in apparent lawlessness. Allah SWT addressed him directly, offering the choice to either punish them or treat them with kindness. Dhul-Qarnayn, embodying fairness, declared that wrongdoers would face punishment in this life and the next, while those who believed and performed righteous deeds would receive the best reward and gentle treatment. This encounter highlighted his role as a just ruler, balancing mercy with accountability.
Continuing his travels, Dhul-Qarnayn followed another path eastward until he arrived at the rising place of the sun. Here, he discovered a people unprotected from its harsh rays, with no shelter provided against it. The Quran notes that Allah SWT had full knowledge of his affairs, emphasising divine oversight in all his endeavours. This brief yet profound meeting underscored the diversity of human conditions and the ruler's observance without interference, perhaps recognising that their state was part of a greater divine plan.
The pinnacle of his journeys came when he reached a pass between two mountains. Beyond them lived a community who could scarcely understand speech, indicating their isolation or linguistic barriers. They appealed to Dhul-Qarnayn, explaining that Gog and Magog were causing great corruption in the land. These tribes, known for their destructive raids, threatened the peace of the region. The people offered tribute in exchange for a barrier to protect them. Demonstrating humility and reliance on Allah SWT, Dhul-Qarnayn declined the payment, stating that the establishment given to him by his Lord was far superior. Instead, he requested their assistance in labour to construct a formidable dam.
With their help, Dhul-Qarnayn directed the building process meticulously. He commanded them to bring sheets of iron, stacking them until they filled the gap between the two mountain sides. Then, he ordered them to blow with bellows until the iron became fiery hot, transforming it into a molten mass. Finally, he instructed that molten copper be poured over it, creating an impenetrable alloy of iron and copper. The resulting wall was so robust that Gog and Magog could neither scale it nor bore through it. This engineering marvel, achieved through collective effort and divine favour, served as a barrier against the marauders.
In a moment of profound gratitude, Dhul-Qarnayn attributed the wall's success to the mercy of his Lord. He prophesied that when the promise of Allah SWT arrives—signalling the approach of the Last Day—the wall would be reduced to dust. This declaration tied the temporal achievement to eternal truths, reminding that all human constructs are transient before divine will. The narrative concludes with a glimpse of the end times: on that day, people will surge like waves, the Horn will be blown, and all will be gathered for judgement. Through this story, the Quran weaves a tale of righteous leadership that protects the vulnerable while acknowledging the ultimate sovereignty of Allah SWT.
What the scholars say
Classical mufassirun have offered insightful interpretations of Dhul-Qarnayn's story, drawing from the Quran and authentic traditions while maintaining neutrality on debated points. Ibn Kathir, in his renowned tafsir, describes Dhul-Qarnayn as a righteous king who worshipped Allah SWT alone, rejecting associations with figures like Alexander due to the latter's idolatry. He emphasises the wall's construction as a divine mercy, citing hadith that link Gog and Magog's release to the end times, when they will swarm from every elevation, as per Surah Al-Anbiya (21:96). Ibn Kathir notes the linguistic challenges of the people Dhul-Qarnayn met, suggesting their plea reflected genuine desperation against the corrupting forces.
At-Tabari, in his comprehensive exegesis, explores the name "Dhul-Qarnayn," proposing it could refer to "two horns" symbolising his dominion over east and west, or perhaps epochs of time. He compiles narrations from early scholars, including views that Dhul-Qarnayn was a servant of Allah SWT empowered for global travel, and stresses the wall's impermeability as a testament to divine aid. At-Tabari remains cautious, avoiding speculative identifications and focusing on the narrative's moral core of justice and protection.
Other scholars like Al-Qurtubi highlight the technological aspect, viewing the iron-and-copper barrier as an example of innovative problem-solving under divine guidance. They all agree on the eschatological significance, with the wall's eventual levelling signalling the fulfilment of Allah's promise, as in Surah Al-Kahf (18:98). These interpretations collectively underscore the story's role in reinforcing faith without endorsing partisan views.
Lessons for today
In reflecting on Dhul-Qarnayn's story, one profound lesson emerges in the exercise of power with humility. As a ruler granted vast authority by Allah SWT, he chose justice over exploitation, reminding us that true leadership stems from recognising divine favours rather than personal glory. In our modern world, where leaders often wield influence for self-interest, this narrative encourages those in positions of authority—be it in families, communities, or nations—to prioritise mercy and fairness, ensuring their actions align with eternal accountability.
Another insight lies in the value of collective effort and innovation in facing challenges. Dhul-Qarnayn's wall was not built in isolation; he enlisted the people's strength, blending their labour with his vision to create something enduring. This mirrors contemporary efforts in community building, environmental protection, or social justice, where collaboration amplifies impact. It invites us to view obstacles as opportunities for creative solutions grounded in faith, trusting that Allah SWT provides the means when intentions are pure.
The prophecy of the wall's destruction serves as a gentle reminder of life's impermanence and the certainty of the Last Day. In an era of rapid change and uncertainty, this encourages mindfulness of eschatological signs, fostering patience and preparation through righteous deeds. Rather than fear, it inspires hope, affirming that divine promises hold true, and chaos will ultimately give way to order under Allah's decree.
Ultimately, the story nurtures a deeper appreciation for divine mercy in protection. Just as the barrier shielded the vulnerable from corruption, we are called to safeguard our own spiritual well-being against modern "Gog and Magog"—temptations like materialism or division—through adherence to Quranic guidance and sunnah.
Frequently asked questions
Who was Dhul-Qarnayn in the Quran?
Dhul-Qarnayn is depicted in Surah Al-Kahf as a righteous ruler empowered by Allah SWT to travel the earth and establish justice. While his exact historical identity is debated—some link him to figures like Cyrus the Great— the Quran focuses on his piety and actions, such as building the wall against Gog and Magog, rather than specifics of his era or origin. He exemplifies humble leadership under divine guidance.
What is the wall of Dhul-Qarnayn made of?
According to Surah Al-Kahf (18:96), the wall was constructed using sheets of iron stacked between two mountains, heated until fiery, and then reinforced with molten copper poured over it. This created an impenetrable barrier against Gog and Magog. Scholars like Ibn Kathir view it as a marvel of ancient engineering, symbolising divine mercy and human ingenuity in protecting communities from corruption.
Who are Gog and Magog in Islamic tradition?
Gog and Magog, or Yajuj wa Majuj, are tribes mentioned in the Quran as great corrupters sealed behind Dhul-Qarnayn's wall until near the end times (Surah Al-Kahf 18:94-98). In eschatology, they will emerge causing chaos before divine intervention destroys them, as per hadith. They represent forces of disorder, with their release signalling major signs of the Day of Judgement.
Where is Dhul-Qarnayn's wall located today?
The Quran does not specify the wall's location, describing it between two mountains where Gog and Magog were contained. Some speculate sites like the Caucasus or Darial Pass, but classical scholars like At-Tabari emphasise its symbolic and eschatological role over geographical precision. It is prophesied to be levelled when Allah's promise comes, remaining hidden or metaphorical until then.
What does the story of Dhul-Qarnayn teach Muslims?
The narrative teaches lessons in just leadership, reliance on Allah SWT, and preparation for the end times. Dhul-Qarnayn's humility in attributing success to divine mercy encourages balancing power with piety. It also highlights innovation and community cooperation against threats, reminding believers of life's transience and the certainty of judgement, fostering spiritual resilience in daily life.
Discover the captivating tale of Dhul-Qarnayn and his monumental wall brought to life in our cinematic retelling on Sacred Ayat. Join us to explore the depths of this Quranic story through visuals that inspire reflection and faith.