يَأْجُوجُ وَمَأْجُوجُ

Gog and Magog (Yajuj and Majuj): The Barrier, the Prophecy, and the Hour

Quranic Story • Surah Al-Kahf 18:94–98 • Surah Al-Anbiya 21:96–97

At a Glance

📖
Mentioned In

Surah Al-Kahf and Surah Al-Anbiya

👥
Key Figures

Gog and Magog, and Dhul-Qarnain

🌟
Main Theme

A sign of the Hour and the certainty of the Last Day

🔖
Verses

18:94–98 • 21:96–97

Massive dark wall stretching between mountains under storm clouds
The barrier that holds them back, until the appointed time

Who Are Gog and Magog?

Gog and Magog, Ya’juj and Ma’juj in Arabic, are peoples mentioned twice in the Quran. They first appear in the story of Dhul-Qarnain, where a vulnerable people complain that Gog and Magog are spreading corruption in the land, raiding and destroying whatever they reach. The second mention comes in Surah Al-Anbiya, where their release is described as one of the great signs that the Hour is near.

The Quran does not tell us where they are, what they look like, or how many they are. Commentators describe them as human peoples of great numbers and destructive nature, and authentic hadiths speak of their emergence near the end of time, when they will surge across the earth in huge numbers. Beyond that, the details belong to the unseen, and the Quran keeps the focus where it belongs: on what their story teaches about the Last Day.

The Barrier of Dhul-Qarnain

When the suffering people asked Dhul-Qarnain for help against Gog and Magog, he built the great barrier of iron blocks and molten copper between two mountains, as described in the story of Dhul-Qarnain. The Quran records the result in a single, decisive verse: they could neither climb over it nor dig through it.

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

Famastata’oo an yazharoohu wa mastata’oo lahu naqba.

So they were unable to pass over it, nor were they able to dig through it. (18:97)

پس وہ نہ اس پر چڑھ سکے اور نہ اس میں نقب لگا سکے۔

Dhul-Qarnain then said what every believer should remember about human achievements: “This is a mercy from my Lord, but when the promise of my Lord comes, He will level it to the ground, and the promise of my Lord is ever true” (18:98). The barrier was never meant to last forever. It was a mercy with an expiry date, set by Allah Himself.

Their Release: A Sign of the Hour

The second Quranic mention of Gog and Magog looks to the future. In Surah Al-Anbiya, Allah describes the time when the barrier will be opened and they will swarm down from every hill, rushing across the earth. The very next verse says that the true promise, the Day of Resurrection, will then draw near, and the eyes of the disbelievers will stare in horror.

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

Hatta idha futihat Ya’jooju wa Ma’jooju wa hum min kulli hadabin yansiloon.

Until, when Gog and Magog are let loose, and they swarm down from every hill. (21:96)

یہاں تک کہ جب یاجوج اور ماجوج کھول دیے جائیں گے اور وہ ہر اونچائی سے دوڑتے آئیں گے۔

The hadith literature adds further detail that is widely reported: the Prophet (peace be upon him) described their emergence as one of the major signs of the Hour, said that they would sweep over the earth in vast numbers, and taught that Allah Himself would destroy them. These narrations are found in the authentic collections, and they frame Gog and Magog not as a mystery to solve but as a reminder to prepare.

Dark storm clouds gathering over distant hills
When they are released, the Hour draws near

Lessons We Learn

  • The Hour is real and approaching. Gog and Magog are a signpost on the road to the Last Day. Their mention is meant to wake hearts, not to satisfy curiosity.
  • Allah controls even the greatest threats. Peoples that no army could stop are held back by a barrier built by His leave, and they will be released only by His leave.
  • Human works are temporary. The strongest wall ever built will one day be leveled. Only Allah’s promise stands forever.
  • Prepare, do not speculate. The Quran gives no map to the barrier and no date for the release. The point is readiness for the Day, not solving the mystery.
  • Corruption never wins in the end. Gog and Magog are defined by spreading corruption, and their story ends with Allah’s judgment. Every corrupt power meets the same end.

Why This Story Matters Today

Every generation wonders about the end of the world, and every generation is tempted to turn the signs of the Hour into speculation and entertainment. The Quran’s treatment of Gog and Magog resists that completely. It gives just enough to establish certainty, the barrier, the release, the nearness of the promise, and leaves the rest to Allah. The believer’s job is not to find the wall but to prepare for the Day it points to.

There is also a quieter lesson here about anxiety. The peoples of the earth once feared Gog and Magog, and Allah sent them a protector in Dhul-Qarnain. Whatever overwhelming force frightens you today, it is still under Allah’s control, still bound by His decree, and still temporary. The One who holds back Gog and Magog holds back everything that threatens you.

FAQ

Who are Gog and Magog (Yajuj and Majuj)?

+

They are peoples mentioned in the Quran (18:94 and 21:96) known for spreading corruption in the land. Dhul-Qarnain built a barrier of iron and copper to hold them back. Their release near the end of time is one of the major signs of the Hour. The Quran does not describe their appearance or location, and those details belong to the unseen.

Where is the wall of Dhul-Qarnain?

+

The Quran does not say where the barrier is, and no one knows its location for certain. Various theories have been proposed over the centuries, but none is established. The Quran’s silence is deliberate: the lesson is about the Hour and Allah’s power, not geography.

When will Gog and Magog be released?

+

Only Allah knows. The Quran says that when they are released and swarm down from every hill, the true promise, the Day of Resurrection, will draw near (21:96–97). Their emergence is counted among the major signs of the Hour in the hadith literature. No one can set a date for it.

What will happen when Gog and Magog come out?

+

The Quran says they will swarm down from every hill as the Hour draws near (21:96–97). Authentic hadiths describe them sweeping across the earth in vast numbers, and teach that Allah Himself will destroy them. The details are part of the unseen; the certain part is that their release signals the nearness of the Last Day.

Are Gog and Magog human?

+

The commentators generally describe them as human peoples, descendants of Adam, known for their great numbers and destructive behavior. The Quran calls them peoples who spread corruption in the land (18:94). Beyond that, their exact nature is part of the unseen, and speculation beyond what is revealed is discouraged.

What should believers learn from this story?

+

The story teaches certainty about the Last Day, trust in Allah’s control over every threat, and the importance of preparation over speculation. It also teaches humility about human achievements: even the mightiest barrier is temporary, while Allah’s promise is ever true.

Final Thoughts

Gog and Magog are behind a barrier today, and they will be released tomorrow, at a time only Allah knows. Their story is the Quran’s way of saying: the end is coming, the signs are real, and the wise prepare. Do not spend your life searching for the wall. Spend it getting ready for the Day the wall points to, with faith, good deeds, and a heart that remembers its Lord.

Continue Reading

Read the full story of Dhul-Qarnain, who built the barrier, or the People of the Cave from the same surah. Browse all stories in the Quranic Stories hub.

Share this page