Skip to main content
Gog and Magog in the Quran

Gog and Magog in the Quran

ahmed gamal
16 August، 2026
Stories in Quran
Key Takeaways
Ya’juj wa Ma’juj (Gog and Magog) appear in the Quran in Surah Al-Kahf (18:83-98) and Surah Al-Anbiya (21:96-97), describing them as a real human nation, not mythical creatures.
Dhul-Qarnayn, a righteous ruler mentioned in the Quran, built an iron-and-copper barrier to contain Ya’juj wa Ma’juj after local tribes pleaded for protection.
Sahih al-Bukhari records that the release of Ya’juj wa Ma’juj is tied to a small breach in the barrier, described by the Prophet Muhammad (PBUH) as a sign that the Hour has drawn near.
Their final emergence, according to Sahih Muslim, occurs during the era of Prophet Isa (peace be upon him) and ends with Allah’s direct intervention rather than human warfare.
Islamic scholarship affirms that Ya’juj wa Ma’juj are among the major signs of the Day of Judgment, not a metaphor for any nation or era.

Gog and Magog appear directly in the Quran — named as Ya’juj wa Ma’juj — as a real human nation whose history spans from ancient barrier-building to a prophesied release near the end of time. 

Two surahs mention them by name: Surah Al-Kahf, which tells the story of the righteous king Dhul-Qarnayn sealing them behind a mighty barrier, and Surah Al-Anbiya, which ties their eventual release to the approach of the Last Hour. 

Where are Gog and Magog mentioned in the Quran?

Gog and Magog are mentioned by name twice in the Quran, once in Surah Al-Kahf and once in Surah Al-Anbiya, each covering a different phase of their story. The first mention comes within the narrative of Dhul-Qarnayn’s travels, describing why a barrier was built to contain them. The second mention comes centuries later in the Quran’s chronology of revelation, describing their release as a marker of the approaching Day of Judgment. Allah says regarding the people who begged Dhul-Qarnayn for protection:

قَالُوا يَا ذَا الْقَرْنَيْنِ إِنَّ يَأْجُوجَ وَمَأْجُوجَ مُفْسِدُونَ فِي الْأَرْضِ فَهَلْ نَجْعَلُ لَكَ خَرْجًا عَلَىٰ أَن تَجْعَلَ بَيْنَنَا وَبَيْنَهُمْ سَدًّا

“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?'” (Quran 18:94)

Ya’juj wa Ma’juj existed as an identifiable people, they were causing real harm to a settled population, and a physical barrier — not a spiritual or symbolic one — was the requested solution. 

The second mention arrives later, tying their story to the eschaton rather than to any historical era, which is explored further below. 

This dual placement is itself instructive; readers exploring faith in Islam will notice how the Quran frequently anchors future events in past, verifiable narratives rather than vague prophecy.

Dhul-Qarnayn built an iron and copper barrier to contain Gog and Magog

Dhul-Qarnayn constructed the barrier using iron sheets fused with molten copper, a detail the Quran describes with specific technical precision. After declining the tribute offered to him, choosing instead to rely on what Allah had already granted him, Dhul-Qarnayn directed the local people to bring him the materials for construction:

آتُونِي زُبَرَ الْحَدِيدِ ۖ حَتَّىٰ إِذَا سَاوَىٰ بَيْنَ الصَّدَفَيْنِ قَالَ انفُخُوا ۖ حَتَّىٰ إِذَا جَعَلَهُ نَارًا قَالَ آتُونِي أُفْرِغْ عَلَيْهِ قِطْرًا

“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.'” (Quran 18:96)

The result was a structure so solid that the Quran describes it in the very next verse:

فَمَا اسْطَاعُوا أَن يَظْهَرُوهُ وَمَا اسْتَطَاعُوا لَهُ نَقْبًا

“So Gog and Magog were unable to pass over it, nor were they able [to effect] in it any penetration.” (Quran 18:97)

Dhul-Qarnayn himself did not claim permanence for this barrier. He attributed its strength to Allah’s mercy and openly stated its eventual fate — a point directly connected to the Quran’s later description of the Last Hour, discussed further in the section below. 

This account also reflects a broader pattern found across Islamic teaching, detailed in the platform’s overview of Islam principles, where divine power is shown operating through tangible, describable means rather than abstraction alone.

Learn More About Islam

Discover the beauty, teachings, and wisdom of Islam in a clear and welcoming way. Start exploring and deepen your understanding today.

Learn More

Who are Ya’juj wa Ma’juj?

Islamic scholars identify Ya’juj wa Ma’juj as human beings descended from Prophet Adam (peace be upon him), specifically through the lineage of Nuh’s son Yafith. 

The renowned exegete Ibn Kathir, in his tafsir of Surah Al-Anbiya, states plainly that Ya’juj wa Ma’juj are from the progeny of Adam and are descendants of Nuh through his son Yafith (Japheth), the same ancestral line from which the Turkic peoples are traditionally traced. 

This detail matters because it removes any ambiguity about their nature — Gog and Magog are not jinn, not angels, and not a mythical race, but an ordinary human population, distinguished only by their extraordinary numbers and their role in the final chapter of human history.

The Prophet Muhammad (PBUH) confirmed their humanity and their descent from Adam directly in a hadith recorded in Sahih al-Bukhari, where Allah addresses Adam on the Day of Resurrection:

“Allah will say (on the Day of Resurrection), ‘O Adam.’ Adam will reply, ‘Labbaik wa Sa’daik.’ … Allah will say: ‘From every one thousand, take out nine-hundred-and ninety-nine.’ … The companions of the Prophet (ﷺ) asked, ‘O Allah’s Apostle! Who is that (excepted) one?’ He said, ‘Rejoice with glad tidings; one person will be from you and one-thousand will be from Gog and Magog.'” (Sahih al-Bukhari 3348)

This hadith serves two purposes at once: it confirms Ya’juj wa Ma’juj’s descent from Adam, and it establishes their staggering numerical scale relative to the rest of humanity — a detail that recurs throughout the eschatological narrations.

Gog and Magog’s barrier breach is described as an active sign of the Last Hour

A hadith in Sahih al-Bukhari describes a specific moment when the Prophet Muhammad (PBUH) reported an opening had already appeared in the barrier, treating it as a live warning rather than distant prophecy. Zainab bint Jahsh, one of the Mothers of the Believers, narrated that the Prophet came to her visibly alarmed and said:

“None has the right to be worshipped but Allah. Woe unto the Arabs from a danger that has come near. An opening has been made in the wall of Gog and Magog like this,” making a circle with his thumb and index finger. (Sahih al-Bukhari 3346)

Zainab then asked whether the believers would be destroyed even while righteous people remained among them, and the Prophet answered that corruption spreading widely enough would bring calamity regardless of individual piety. 

This hadith is significant for a reason readers often overlook: it shows the barrier is not described as static or purely symbolic. 

It is treated as a real structure subject to gradual weakening, consistent with Dhul-Qarnayn’s own words in the Quran that Allah would eventually level it when His promise arrives. 

Gog and Magog’s final release is tied directly to the era of Prophet Isa

Sahih Muslim records that Ya’juj wa Ma’juj will emerge in full force only after Prophet Isa (peace be upon him) has already descended and killed the Dajjal, placing their release firmly within a specific prophetic sequence rather than an isolated event. Al-Nawwas ibn Sam’an narrated a lengthy hadith describing the sequence of the Dajjal, the descent of Isa, and what follows immediately after:

“Allah will reveal to Isa: ‘I have brought forth from among My slaves people whom none will be able to fight, so take My slaves safely to Mount Tur.’ Then Allah will send Ya’juj and Ma’juj, and they will swoop down from every mound. The first of them will pass by Lake Tiberias and drink from it, and the last of them will pass by and say, ‘There was water here once.'” (Sahih Muslim 2937a)

The same hadith continues, describing Isa and his companions besieged until conditions become severe, at which point they implore Allah directly rather than continuing to fight — a detail underscoring that Ya’juj wa Ma’juj cannot be defeated through ordinary human combat. 

Allah answers this supplication by sending a plague that ends their threat within a single night, restoring the earth immediately afterward. 

This sequence is echoed in the Quran’s own description in Surah Al-Anbiya:

حَتَّىٰ إِذَا فُتِحَتْ يَأْجُوجُ وَمَأْجُوجُ وَهُم مِّن كُلِّ حَدَبٍ يَنسِلُونَ

“Until when [the dam of] Gog and Magog has been opened and they, from every elevation, descend.” (Quran 21:96)

Learn More About Islam

Discover the beauty, teachings, and wisdom of Islam in a clear and welcoming way. Start exploring and deepen your understanding today.

Learn More

Read Also: Mary in the Quran

Take the Next Step Toward Understanding Islam


Questions about the unseen — the signs of the Hour, the fate of nations, and the promises Allah has made — deserve answers grounded in real evidence, not speculation.

Explore more accessible explanations on the Salam Platform.

Read further reflections and explanations on the Salam blog.

Have a specific question about this topic or something else in Islam? Reach out directly — the Salam Center team welcomes sincere inquiry at any stage of your journey.

If you are considering Islam, or have already taken your Shahada and want structured guidance afterward, the Salam Center offers the Asawirat Al-Yaqeen (Bracelets of Certainty) program, a four-stage journey built for exactly this kind of question:

  • Stage One lays the foundation — the Shahada, the pillars of Islam, and how to pray
  • Stage Two builds sincerity — repentance, and the life of Prophet Muhammad (PBUH)
  • Stage Three strengthens daily practice — etiquette, family life, and everyday rulings
  • Stage Four addresses deeper questions — including the very kind of eschatological topics covered in this article

Reach out directly to the Salam Center team to start the Asawirat Al-Yaqeen (Bracelets of Certainty) program for FREE.

Summary

Gog and Magog, named Ya’juj wa Ma’juj in the Quran, are described across two surahs as a real human nation descended from Adam through Nuh’s son Yafith. Their story spans a historical barrier built by Dhul-Qarnayn and a future release tied to the era of Prophet Isa.

Authentic hadiths from Sahih al-Bukhari and Sahih Muslim confirm both the barrier’s gradual weakening and the manner of their eventual destruction through divine intervention. Their account stands as one of Islam’s clearest examples of prophecy anchored in verifiable, describable events rather than abstraction.

Frequently Asked Questions

Are Gog and Magog mentioned in the Quran?

Yes, Gog and Magog are named directly as Ya’juj wa Ma’juj in Surah Al-Kahf (18:94-97) and Surah Al-Anbiya (21:96), describing both the barrier built to contain them and their eventual release before the Day of Judgment.

Who built the barrier against Gog and Magog?

Dhul-Qarnayn, a righteous ruler mentioned in the Quran, built the barrier using iron sheets fused with molten copper, as described in Quran 18:96, after local tribes asked him for protection from Ya’juj wa Ma’juj.

Are Gog and Magog human beings in Islam?

Yes, Islamic scholarship unanimously holds that Ya’juj wa Ma’juj are human descendants of Prophet Adam (peace be upon him) through Nuh’s son Yafith, confirmed by the hadith in Sahih al-Bukhari 3348, not mythical or supernatural beings.

When will Gog and Magog be released according to Islam?

According to Sahih Muslim 2937a, Ya’juj wa Ma’juj will be released after Prophet Isa (peace be upon him) has descended and killed the Dajjal, placing their emergence within the final sequence of signs before the Day of Judgment.

How will Gog and Magog be defeated?

Sahih Muslim 2937a reports that Prophet Isa and his companions will retreat to Mount Tur and supplicate Allah, who will then send a plague that destroys Ya’juj wa Ma’juj within a single night, without any human battle required.

Curious about Islam?

Journey towards clarity and purpose. Our team is here to support you in your search for truth and spiritual guidance.

Embrace the Truth

Leave a Comment

Your email address will not be published. Required fields are marked *

Ask on WhatsApp Ask a Question