End Times & Eschatology

Gog and Magog (Yajuj and Majuj)

Gog and Magog (Yaʾjūj and Maʾjūj) in Islamic End Times

Gog and Magog (Yaʾjūj and Maʾjūj) in Islamic End Times

Gog and Magog (called Yaʾjūj and Maʾjūj in Arabic) are among the most fearsome signs of the end of the world in Islamic belief. They are described as massive hordes of people who will break free and overwhelm the earth in the last days. This topic is important in Sunni Muslim teachings on the end times (eschatology). In this easy-to-read overview, we'll explore who Yaʾjūj and Maʾjūj are, what the Qur’an and authentic Hadith say about them, how classical and modern scholars have explained them, and what lessons we can learn.

Who Are Yaʾjūj and Maʾjūj?

Yaʾjūj and Maʾjūj (Gog and Magog) are mentioned in both the Qur’an and earlier scriptures (the Bible also speaks of “Gog and Magog”). In Islamic tradition, they are two wild human tribes (or nations) descended from Adam (the first man). They are not mythical creatures or aliens – they are human, but extraordinarily fierce and numerous.

The Qur’anic Story: Dhul-Qarnayn and the Barrier

The Qur’an introduces Yaʾjūj and Maʾjūj in the story of a righteous king named Dhul-Qarnayn (the "Two-Horned One"). Dhul-Qarnayn traveled across the world spreading justice. In Surah Al-Kahf (Chapter 18), he reaches a land where people beg for his help against the ravages of Gog and Magog:

“They said, ‘O Dhul-Qarnayn, indeed Gog and Magog are [great] corrupters in the land. So can we pay you to build a barrier between us and them?’” (Qur’an 18:94)

Dhul-Qarnayn agreed to help, not for payment but as a service to Allah. He built a massive wall or barrier between two mountains to block the path of Yaʾjūj and Maʾjūj. The Qur’an describes how he used iron and molten copper to forge an unbreakable barrier strong enough to contain those violent tribes:

“[Dhul-Qarnayn said,] ‘Bring me blocks of iron,’ – until, when he had filled up the gap between the mountains, he said, ‘Blow,’ – until when he had made it (like) fire, he said, ‘Bring me molten copper to pour over it.’(Qur’an 18:96)

“And so [the barrier was built] and they [Gog and Magog] were unable to scale it nor could they pierce it.” (Qur’an 18:97)

By the grace of God, this wall completely trapped Gog and Magog behind it. The people were saved from their terror, and Dhul-Qarnayn declared that the wall’s protection was a mercy from Allah. However, he also gave a warning: one day, when Allah wills, this barrier will be broken and Yaʾjūj and Maʾjūj will surge forth again:

“He [Dhul-Qarnayn] said, ‘This is a mercy from my Lord. But when the promise of my Lord comes to pass, He will level this barrier to the ground. And my Lord’s promise is always true.’” (Qur’an 18:98)

This Quranic passage is both historical (describing a past event) and prophetic (hinting at a future event). It sets the stage for Gog and Magog’s role in the end times: Allah’s “promise” will come true when the barrier collapses, releasing them once more.

A Sign of the Last Hour: The Release of Gog and Magog

Islam teaches that the emergence of Yaʾjūj and Maʾjūj will be one of the major signs of the approach of the Day of Judgment. The Qur’an explicitly mentions this outbreak in the context of the end times:

“Until, when Gog and Magog are let loose (from their barrier) and they swiftly swarm from every hill.” (Qur’an 21:96)

In Islamic eschatology, this event will happen after other great signs. According to authentic Hadith, Prophet ʿĪsā (Jesus, peace be upon him) will return to earth and defeat the False Messiah (Al-Masīḥ Ad-Dajjāl, the Antichrist). After this victory, Allah will inform Prophet Jesus that a new threat is coming: “I have released servants of Mine so powerful that none can fight them; so take My servants to safety on the mountain.” These released servants are Gog and Magog.

At that time, the barrier of Dhul-Qarnayn will finally give way. Yaʾjūj and Maʾjūj will pour out in astonishing numbers, like a human flood. No army on earth will be able to withstand them. The Prophet Muhammad ﷺ described their emergence in vivid detail:

The Prophet ﷺ said: “Gog and Magog are digging every day through the barrier, until they almost break through. Then their leader says, ‘Go back, we will finish tomorrow.’ But Allah causes the barrier to return to its strength, and they start over next day. This will continue until, when Allah wills to release them, their leader will say, ‘Go back, we will finish tomorrow, in shā’ Allāh (if Allah wills).’ This time he adds ‘if Allah wills,’ so the next day they find the wall as they left it, and they break through. They will emerge and attack mankind ferociously. They will drink up the waters of the earth – even the Lake of Tiberias in Palestine will be drained! People will flee and fortify themselves in fear. Gog and Magog will shoot arrows into the sky, and the arrows will fall back down with blood on them. In their arrogance they will say, ‘We have defeated the people of earth and overcome the people of heaven.’ Then Allah will send against them worms (tiny creatures) that bore into their necks, and overnight they will all perish as one! By Him in Whose hand is my soul, the beasts of the earth will be satiated, fattened by their flesh.” (Hadith – Sunan Ibn Mājah)

Let’s break down the sequence of this incredible hadith for clarity:

  1. Daily Digging: While confined, Gog and Magog constantly try to dig their way out. They almost succeed each day, but by Allah’s will the barrier miraculously remains intact until its appointed time. This shows that Allah controls exactly when they will be unleashed.

  2. The Barrier Yields: When their release is destined, the barrier will finally open. The phrase “in shā’ Allāh” (if God wills) coming from their leader is interesting – it’s as if Allah inspires even these disbelieving people to speak a word of truth at the right moment, allowing His decree to unfold.

  3. Swarming the Earth: Gog and Magog will rush out. Their numbers are so great that they consume everything in their path. The hadith mentions them drinking an entire lake dry. Imagine an ocean of people moving together – that is how overwhelming their presence will be.

  4. Unmatched Chaos: They will cause destruction everywhere. No human force can defeat them – not even the righteous followers of Prophet Jesus. In fact, the believers under Prophet Jesus will be forced to retreat, likely to Mount Sinai (Tur), or another mountain, praying for Allah’s help as Gog and Magog overrun the land.

  5. Arrogance Against Heaven: Gog and Magog are portrayed as so arrogant and violent that they even shoot arrows towards the sky. Allah will cause the arrows to return with what looks like blood, to test them and increase their delusion. They will boast that they’ve even conquered whatever is above them (“the people of heaven”), defying any power opposed to them. This shows their extreme arrogance and godlessness.

  6. Divine Intervention – Their Demise: Just when Gog and Magog dominate the earth, Allah Himself will destroy them in an instant. He will send a miraculous plague – described as small worms or insect-like creatures that burrow into the necks of each Gog and Magog individual. In one night, this unseen agent will silently wipe out the entire horde. By morning, none of them will be left alive. This dramatic end shows that no matter how mighty humans may be, they are utterly weak before Allah’s power; even tiny worms can fell the world’s mightiest army if Allah so wills.

  7. Aftermath: The earth will be filled with the corpses of Gog and Magog – so many that the stench and decay will pose a serious problem. Authentic narrations say that Prophet Jesus and the believers with him will pray to Allah for relief. Allah will then send birds as large as camels to carry off the bodies and drop them where Allah wills, and send rain to wash and cleanse the earth. In the hadith above, it is mentioned metaphorically that wild beasts and birds will gorge on the bodies of Gog and Magog due to their sheer volume. Either way, *Allah will clear the earth of their carcasses and restore cleanliness and balance after that great devastation.

(These details are found in other hadith narrations – for example, in *Sahīh Muslim, it is described that after Gog and Magog die, Allah will send birds to carry their bodies away, and then heavy rain to wash the earth. All these narrations together paint the full picture of what happens.)

After the elimination of Yaʾjūj and Maʾjūj, the hadiths indicate there will be a period of peace and prosperity on earth. With those corrupt forces gone, humanity (under Prophet Jesus’s guidance) will experience safety like never before, albeit for a short time. This is part of Allah’s plan to show that after the worst tribulations, there is relief for the believers. Eventually, as time passes, people will again fall into error, and the final Hour will come upon the worst of mankind. But the story of Gog and Magog stands out as the peak of worldly chaos before the final end, and a definitive proof of Allah’s power over all things.

Commentary from Islamic Scholars

Sunni scholars throughout history have spoken extensively about Yaʾjūj and Maʾjūj when explaining the Qur’an and hadith. Classical scholars like Imam Ibn Kathīr (a 14th-century scholar) affirm from the texts that Gog and Magog are real human groups who will appear near Judgment Day to fulfill Allah’s decree. In his famous commentary (Tafsīr Ibn Kathīr), he mentions the reports of their daily digging and eventual release, and he traces their lineage to the children of Adam – even suggesting they descended from Noah’s son Yafith (Japheth) based on early Islamic historiography. Ibn Kathīr also wrote a book of end-times (Al-Nihāyah fi al-Fitan wa al-Malāḥim, “The End in Wars and Calamities”) where he gathered prophecies, including those about Yaʾjūj and Maʾjūj, to educate Muslims about these events.

Imam al-Qurṭubī (13th-century scholar) in his Qur’an tafsīr discusses the story of Dhul-Qarnayn and notes that the barrier was a real, physical wall built by Dhul-Qarnayn through Allah’s help. He, like the majority of scholars, rejects allegorical interpretations that some might propose. Al-Qurṭubī also relates how people in his time (the medieval period) wondered about the location of this wall – some thought it might be in the lands of the Caucasus or Central Asia. Muslim geographers and travelers even tried to find it. (A famous traveler, Salman the Persian, was said to have reached a great wall in the far north, and some later scholars like Yaqut and Ibn Battuta mention walls that people associated with Dhul-Qarnayn’s barrier.) However, no confirmed discovery of the wall has ever been documented, and scholars often say that Allah has concealed it from mankind. The exact location is unknown, and that is by divine wisdom to keep people from tampering with it.

Modern scholars continue to uphold the same understanding. They emphasize that the reports about Gog and Magog are from the Qur’an and Sahih (authentic) Hadith, so a Muslim must acknowledge them even if they seem astonishing. Contemporary scholars like Dr. ʿUmar Sulaimān al-Ashqar note that belief in such unseen matters is part of faith. He writes that a Muslim should not doubt that Yaʾjūj and Maʾjūj exist just because our current science or geography cannot explain where they are. After all, our knowledge is limited and Allah’s creation is vast and full of wonders. Shaykh Yasir Qadhi, a well-known teacher, mentions in his lectures that Gog and Magog’s story tests our humility – we may think we have mapped every inch of the world, yet we trust that Allah can keep a group of people hidden until the proper time. Many scholars caution against indulging in too much speculation (such as trying to identify Gog and Magog with a current nation or linking them to past events like the Mongol invasion). The safest course, they advise, is to stick to the scriptural descriptions: they are a unique people, unlike any other, and their full reality will manifest in the future as per the prophecies.

It’s worth noting that all four major schools of Sunni Islamic thought (Hanafi, Maliki, Shafi’i, Hanbali) are in agreement on the essential belief in Yaʾjūj and Maʾjūj and their role in the end times. This is not a matter of legal difference (since it’s about belief, not a jurisprudential issue); rather, it’s part of the shared creed. Any apparent differences are minor – for instance, scholars have offered different opinions on when exactly during the reign of Jesus the emergence will happen, or how long Gog and Magog will wreak havoc before being destroyed. Some classical historians even speculated if certain barbarian hordes of their time (like the Mongols or Tartars) were Gog and Magog, given the resemblance in ferocity – but the dominant Islamic view is that the real Gog and Magog have yet to appear in the definitive way described by the Prophets.

In summary, Sunni scholarship – from the earliest Tafsīr commentators to the latest Muslim academics – consistently portrays Yaʾjūj and Maʾjūj as a literal reality and a future certainty. Muslims are encouraged to learn about them as part of understanding the trials of the Last Days.

Miracles and Divine Wisdom in the Story

The saga of Gog and Magog is accompanied by remarkable miracles that demonstrate Allah’s power and wisdom:

Each of these points contains deep wisdom. Through these miracles, Allah teaches lessons to humanity: humility before the unseen, patience for divine relief, and reliance on Him over any “invincible” worldly power.

Lessons and Reflections for Believers

The story of Gog and Magog is not just a thrilling tale of the apocalypse; it carries important lessons and reminders that demonstrate the beauty and truth of Islam. Here are some reflections on what believers can learn:

The Prophet ﷺ said: “Woe to the Arabs from an evil that has drawn near! Today a hole like this has been opened in the barrier of Gog and Magog.” He then formed a circle with his thumb and index finger (to show the size of the hole). Zainab bint Jahsh (ra) said, “O Messenger of Allah, will we be destroyed even though there are righteous people among us?” He said, “Yes, if evil becomes overwhelming (i.e. prevalent).” (Sahih al-Bukhari)

In essence, the topic of Yaʾjūj and Maʾjūj, while frightening on the surface, ultimately highlights Allah’s justice and mercy. It illustrates the triumph of truth over the most brutal falsehood, and it warns the oppressors of what fate awaits them. At the same time, it consoles the believers that Allah’s help is near, even in the face of unimaginable odds. These reflections indeed show the beauty and depth of Islam – a religion that prepares its followers for all facets of reality, both seen and unseen, and guides them morally and spiritually through even the most daunting future scenarios.

Conclusion

Gog and Magog are a powerful reminder of the epic scale of events that will precede the Day of Judgment in Islamic belief. From the Quranic story of Dhul-Qarnayn’s barrier to the detailed prophecies given by Prophet Muhammad ﷺ, we learn that Yaʾjūj and Maʾjūj are real and significant players in the cosmic drama of the end times. A Muslim is expected to believe in their coming, without doubt or ridicule, as this is part of trusting Allah’s words.

The subject of Yaʾjūj and Maʾjūj should strengthen our conviction in the truth of Islam. How remarkable that the Prophet Muhammad ﷺ, in the 7th century, informed us of events that have not yet happened – events corroborated by scripture before him and which we see unfolding signs of as time moves on. For instance, the continuous moral decline and conflicts in the world can be seen as paving the way for such final chaos. Each sign that has already occurred (such as the minor signs of the end times) gives us confidence that the remaining major signs, including Gog and Magog, will also occur in due time. This truthfulness of prophecy is an evidence of Muhammad’s prophethood and the divine origin of the Qur’an. No mere human could prophesize these details without inspiration from the All-Knowing.

As Muslims, knowing about Gog and Magog leaves us with a sobering understanding that humanity’s story will have a climax. It urges us to not become complacent. We must align ourselves with righteousness, so that we are among those whom Allah protects through these trials – or at least so that we meet our own end with faith if we pass away before such events. It also instills a sense of awe and submission: the world is moving according to Allah’s plan, and ultimately, all power belongs to Him.

Finally, reflecting on Yaʾjūj and Maʾjūj should fill our hearts with gratitude and humility. Gratitude that Allah has informed us in advance – out of mercy – about what will happen, so we can be prepared and not despair when trials intensify. And humility in realizing that we are part of a much bigger story and that Allah’s wisdom encompasses everything.

In the end, whether or not we witness the time of Gog and Magog, our belief in them today is a testament to our trust in Allah and His Messenger. This belief should motivate us to improve ourselves and our communities, to stand firm against corruption and evil, and to maintain hope in Allah’s victory. The Prophet ﷺ taught us to continuously seek protection from tribulations; we often supplicate to Allah to protect us from the trials of the end times. By remembering Yaʾjūj and Maʾjūj, we keep that urgency and reliance on Allah alive in our hearts.

May Allah grant us steadfast faith, protect us from the worst of trials, and make us among the righteous who are saved from the oppression of Gog and Magog and all other evils. The story of Gog and Magog, ultimately, reaffirms that truth will prevail and Allah’s promise will never fail. As the Qur’an says, “Indeed, the promise of Allah is truth, but most of the people do not know.” (10:55)


Recommended Further Reading

For those who want to explore the topic of Gog and Magog and Islamic end-times in more depth, here is a list of highly regarded books (classical and modern) by mainstream scholars:

each of these resources will deepen your understanding of Yaʾjūj and Maʾjūj and strengthen your appreciation of Islamic teachings on the end times. May your study be beneficial and enlightening!