Gog and Magog (//; //; Hebrew: גּוֹג וּמָגוֹג Gog u-Magog) in the Hebrew Bible may be individuals, peoples, or lands; a prophesied enemy nation of God's people according to the Book of Ezekiel, and one of the nations according to Genesis descended from Japheth son of Noah.
The Gog prophecy is meant to be fulfilled at the approach of what is called the "end of days", but not necessarily the end of the world. Jewish eschatology viewed Gog and Magog as enemies to be defeated by the Messiah, which will usher in the age of the Messiah. Christianity's interpretation is more starkly apocalyptic: making Gog and Magog allies of Satan against God at the end of the millennium, as can be read in the Book of Revelation.
To Gog and Magog were also attached a legend, certainly current by the Roman period, that they were people contained beyond the Gates of Alexander erected by Alexander the Great. Romanized Jewish historian Josephus knew them as the tribe descended from Magog the Japhethite, as in Genesis, and explained them to be the Scythians. In the hands of Early Christian writers they became apocalyptic hordes, and throughout the Medieval period variously identified as the Huns, Khazars, Mongols, or other nomads, or even the Ten Lost Tribes of Israel.
The legend of Gog and Magog and the gates were also interpolated into the Alexander Romances. In one version, "Goth and Magoth" are kings of the Unclean Nations, driven beyond a mountain pass by Alexander, and blocked from returning by his new wall. Gog and Magog are said to engage in human cannibalism in the romances and derived literature. They have also been depicted on Medieval cosmological maps, or Mappa mundi, sometimes alongside Alexander's wall.
Gog and Magog appear in the Quran as Yajuj and Majuj (Arabic: يأجوج ومأجوج Yaʾjūj wa-Maʾjūj), adversaries of Dhul-Qarnayn, widely equated with Cyrus the Great and al-Iskanadar (Alexander the Great) in Islam. Muslim geographers identified them at first with Turkic tribes from Central Asia and later with the Mongols. In modern times they remain associated with apocalyptic thinking, especially in the United States and the Muslim world.