Gog and Magog or Yaʾjuj wa Maʾjuj (Arabic: یَأجوج وَ مَأجوج) are tribes mentioned in the Qur'an and the religious texts of Judaism and Christianity. "Gog" and "Magog" are characterized in religious texts as a cruel group (مفسدون في الأرض)( Doing big mischief on earth) (Sura 18, Verse 94) who harassed and abused others and plundered their possessions. On the Qur'anic account, Dhu l-Qarnayn ذو القرنين constructed a dam, at the request of people who were oppressed by "Gog" and "Magog", in order to protect them against their aggression. The dam was known as "Sadd Dhu l-Qarnayn" (the Dam of Dhu l-Qarnayn) or the "Dam of Gog and Magog". Some people have speculated that the dam is located in northern Georgia. The Qur'an as well as the religious texts of Christianity and Judaism have referred to the destruction of the dam and the renewed riot of "Gog" and "Magog" as an event in End Time.
The Qur'an has referred to Gog and Magog in Sura al-Kahf, verses 93-98 and Sura al-Anbiya', verse 96 as people who did mischief in the land and harmed others. In Sura al-Anbiya', the riot of "Gog" and "Magog" is mentioned as an indication of the End Time.
In one of his journeys, Dhul Qarnayn, a believing king, arrived in a region which was located between two mountains. People of the region told him that "Gog" and "Magog" who lived on the other side of the mountain frequently invaded their lands and plundered everything. People asked Dhul Qarnayn to construct a dam preventing "Gog" and "Magog" in exchange for some money. With the help of people, he constructed a dam with molten iron and copper without receiving any money from them. The dam came to be known as the "Dam of Dhu l-Qarnayn" or the "Dam of Gog and Magog". The Qur'an has narrated the story in verses 93 to 98 of Sura al-Anbiya'. Some people believe that the dam is located in Darial Gorge in the north of Tbilisi on the Georgia-Russia border.
The Qur'an has mentioned that the riot of "Gog and Magog" is an indication of the events of the End Time. In the verse 96 of Sura al-Anbiya', God has reported about a sign of the End Time: "Until when Gog and Magog are let loose, and they race down from every slope."
Their riot in the End Time was also mentioned in the Book of Ezekiel in the Old Testament and the Book of Revelation of John in the New Testament.