Dhu al-Qarnayn
, (, ;  "The Two-Horned One") appears in the Quran, Surah Al-Kahf (18), Ayahs 83–101 as one who travels to east and west and sets up a barrier between a certain people and Ya'juj and Ma'juj. Elsewhere the Quran tells how the end of the world will be signaled by the release of Gog and Magog from behind the barrier. Other apocalyptic writings predict that their destruction by God in a single night will usher in the Day of Resurrection (). The majority of modern scholars and Islamic commentators identify Dhu al-Qarnayn with Alexander the Great. Early Muslim commentators and historians variously identified , most notably as Alexander the Great and as the South Arabian Himyarite king al-Ṣaʿb bin Dhī Marāthid. Ancient Ethiopic texts written by Jewish, Christian, and Muslim scribes have also referred to Alexander the Great as Dhu al-Qarnayn. Some modern scholars have argued that the origin of the Quranic story may be found in the Syriac Alexander Legend, but others disagree. Quran 18:83-101 

The story of Dhu al-Qarnayn is related in Surah 18 of the Quran, al-Kahf ("The Cave") revealed to Muhammad when his tribe, Quraysh, sent two men to discover whether the Jews, with their superior knowledge of the scriptures, could advise them on whether Muhammad was a true prophet of God. The rabbis told them to ask Muhammad about three things, one of them "about a man who travelled and reached the east and the west of the earth, what was his story". "If he tells you about these things, then he is a prophet, so follow him, but if he does not tell you, then he is a man who is making things up, so deal with him as you see fit." (Verses 18:83-98)

The verses of the chapter reproduced below show Dhu al-Qarnayn traveling first to the Western limit of travel where he sees the sun set in a muddy spring, then to the furthest East where he sees it rise from the ocean, and finally northward to a place in the mountains where he finds a people oppressed by Gog and Magog:

{|class="wikitable" style
! scope="col" width="10%" | Verse Number
! scope="col" width="45%" | Arabic (Uthmani script)
! scope="col" width="45%" | Talal Itani
|-
! scope="row" | 18:83
|وَيَسْـَٔلُونَكَ عَن ذِى ٱلْقَرْنَيْنِ ۖ قُلْ سَأَتْلُوا۟ عَلَيْكُم مِّنْهُ ذِكْرًا
|And they ask you about Zul-Qarnain. Say, “I will tell you something about him.”
|-
! scope="row" | 18:84
|إِنَّا مَكَّنَّا لَهُۥ فِى ٱلْأَرْضِ وَءَاتَيْنَٰهُ مِن كُلِّ شَىْءٍ سَبَبًا
|We established him on earth, and gave him all kinds of means. |-
! scope="row" | 18:85
|فَأَتْبَعَ سَبَبًا
|He pursued a certain course. |-
! scope="row" | 18:86
|حَتَّىٰٓ إِذَا بَلَغَ مَغْرِبَ ٱلشَّمْسِ وَجَدَهَا تَغْرُبُ فِى عَيْنٍ حَمِئَةٍ وَوَجَدَ عِندَهَا قَوْمًا ۗ قُلْنَا يَٰذَا ٱلْقَرْنَيْنِ إِمَّآ أَن تُعَذِّبَ وَإِمَّآ أَن تَتَّخِذَ فِيهِمْ حُسْنًا
|Until, when he reached the setting of the sun, he found it setting in a murky spring, and found a people in its vicinity. We said, “O Zul-Qarnain, you may either inflict a penalty, or else treat them kindly.”
|-
! scope="row" | 18:87
|قَالَ أَمَّا مَن ظَلَمَ فَسَوْفَ نُعَذِّبُهُۥ ثُمَّ يُرَدُّ إِلَىٰ رَبِّهِۦ فَيُعَذِّبُهُۥ عَذَابًا نُّكْرًا
|He said, “As for him who does wrong, we will penalize him, then he will be returned to his Lord, and He will punish him with an unheard-of torment. |-
! scope="row" | 18:88
|وَأَمَّا مَنْ ءَامَنَ وَعَمِلَ صَٰلِحًا فَلَهُۥ جَزَآءً ٱلْحُسْنَىٰ ۖ وَسَنَقُولُ لَهُۥ مِنْ أَمْرِنَا يُسْرًا
|“But as for him who believes and acts righteously, he will have the finest reward, and We will speak to him of Our command with ease.”
|-
! scope="row" | 18:89
|ثُمَّ أَتْبَعَ سَبَبًا
|Then he pursued a course. |-
! scope="row" | 18:90
|حَتَّىٰٓ إِذَا بَلَغَ مَطْلِعَ ٱلشَّمْسِ وَجَدَهَا تَطْلُعُ عَلَىٰ قَوْمٍ لَّمْ نَجْعَل لَّهُم مِّن دُونِهَا سِتْرًا
|Until, when he reached the rising of the sun, he found it rising on a people for whom We had provided no shelter from it. |-
! scope="row" | 18:91
|كَذَٰلِكَ وَقَدْ أَحَطْنَا بِمَا لَدَيْهِ خُبْرًا 
| And so it was. We had full knowledge of what he had. |-
! scope="row" | 18:92
|ثُمَّ أَتْبَعَ سَبَبًا
|Then he pursued a course. |-
! scope="row" | 18:93حَتَّىٰٓ إِذَا بَلَغَ بَيْنَ ٱلسَّدَّيْنِ وَجَدَ مِن دُونِهِمَا قَوْمًا لَّا يَكَادُونَ يَفْقَهُونَ قَوْلًا
|Until, when he reached the point separating the two barriers, he found beside them a people who could barely understand what is said. |-
! scope="row" | 18:94
|قَالُوا۟ يَٰذَا ٱلْقَرْنَيْنِ إِنَّ يَأْجُوجَ وَمَأْجُوجَ مُفْسِدُونَ فِى ٱلْأَرْضِ فَهَلْ نَجْعَلُ لَكَ خَرْجًا عَلَىٰٓ أَن تَجْعَلَ بَيْنَنَا وَبَيْنَهُمْ سَدًّا
| They said, “O Zul-Qarnain, the Gog and Magog are spreading chaos in the land. Can we pay you, to build between us and them a wall?”
|-
! scope="row" | 18:95
|قَالَ مَا مَكَّنِّى فِيهِ رَبِّى خَيْرٌ فَأَعِينُونِى بِقُوَّةٍ أَجْعَلْ بَيْنَكُمْ وَبَيْنَهُمْ رَدْمًا
|He said, “What my Lord has empowered me with is better. But assist me with strength, and I will build between you and them a dam.”
|-
! scope="row" | 18:96
|ءَاتُونِى زُبَرَ ٱلْحَدِيدِ ۖ حَتَّىٰٓ إِذَا سَاوَىٰ بَيْنَ ٱلصَّدَفَيْنِ قَالَ ٱنفُخُوا۟ ۖ حَتَّىٰٓ إِذَا جَعَلَهُۥ نَارًا قَالَ ءَاتُونِىٓ أُفْرِغْ عَلَيْهِ قِطْرًا 
|“Bring me blocks of iron.” So that, when he had leveled up between the two cliffs, he said, “Blow.” And having turned it into a fire, he said, “Bring me tar to pour over it.”
|-
! scope="row" | 18:97
|فَمَا ٱسْطَٰعُوٓا۟ أَن يَظْهَرُوهُ وَمَا ٱسْتَطَٰعُوا۟ لَهُۥ نَقْبًا
|So they were unable to climb it, and they could not penetrate it. |-
! scope="row" | 18:98
|قَالَ هَٰذَا رَحْمَةٌ مِّن رَّبِّى ۖ فَإِذَا جَآءَ وَعْدُ رَبِّى جَعَلَهُۥ دَكَّآءَ ۖ وَكَانَ وَعْدُ رَبِّى حَقًّا
|He said, “This is a mercy from my Lord. But when the promise of my Lord comes true, He will turn it into rubble, and the promise of my Lord is always true.”
|-
! scope="row" | 18:99
|وَتَرَكْنَا بَعْضَهُمْ يَوْمَئِذٍ يَمُوجُ فِى بَعْضٍ ۖ وَنُفِخَ فِى ٱلصُّورِ فَجَمَعْنَٰهُمْ جَمْعًا
|On that Day, We will leave them surging upon one another. And the Trumpet will be blown, and We will gather them together. |-
! scope="row" | 18:100
|وَعَرَضْنَا جَهَنَّمَ يَوْمَئِذٍ لِّلْكَٰفِرِينَ عَرْضًا
|On that Day, We will present the disbelievers to Hell, all displayed. |-
! scope="row" | 18:101
|ٱلَّذِينَ كَانَتْ أَعْيُنُهُمْ فِى غِطَآءٍ عَن ذِكْرِى وَكَانُوا۟ لَا يَسْتَطِيعُونَ سَمْعًا
|Those whose eyes were screened to My message, and were unable to hear. |}

Gog and Magog
Cyril Glassé writes the following with regard to the name "He of the two horns":

Modern Islamic apocalyptic writers put forward various explanations for the absence of the wall from the modern world, some saying that the Mongols were Gog and Magog and that the barrier has now disappeared, others that Gog and Magog are still present but invisible to human eyes:
...[T]he geography of the world is known, but despite this advance this "Barrier" [Quran 18:94] is not heard of ... The answer is that not everything in existence can be seen. (Abd al-Azim al-Khilfa, 1996)

Later literature

 the traveller was a favourite subject for later writers. In one of many Arabic and Persian versions of the meeting of Alexander with the Indian sages, the Persian Sunni mystic and theologian Al-Ghazali (Abū Ḥāmid Muḥammad ibn Muḥammad al-Ghazālī, 1058–1111) wrote of how  came across a people who had no possessions but dug graves at the doors of their houses; their king explained that they did this because the only certainty in life is death. Ghazali's version later made its way into the Thousand and One Nights. The Sufi poet Rumi (Jalāl ad-Dīn Muhammad Rūmī, 1207-1273), perhaps the most famous of medieval Persian poets, described 's eastern journey. The hero ascends Mount Qaf, the "mother" of all other mountains, which is made of emerald and forms a ring encircling the entire Earth with veins under every land. At 's request the mountain explains the origin of earthquakes: when God wills, the mountain causes one of its veins to throb, and thus an earthquake results. Elsewhere on the great mountain  meets Israfil (the archangel Raphael), standing ready to blow the trumpet on the Day of Judgement. The Malay-language Hikayat Iskandar Zulkarnain traces the ancestry of several Southeast Asian royal families, such as the Sumatra Minangkabau royalty, from Iskandar Zulkarnain, through Raja Rajendra Chola (Raja Suran, Raja Chola) in the Malay Annals. People identified as

Alexander the Great

According to some historians, the story of  has its origins in legends of Alexander the Great current in the Middle East, namely the Syriac Alexander Legend but this thesis has been refuted several times by other historians and Muslim scholars. The Scythians, the descendants of Magog, once defeated one of Alexander's generals, upon which Alexander built a wall in the Caucasus mountains to keep them out of civilised lands (the basic elements are found in Flavius Josephus). The legend went through much further elaboration in subsequent centuries before eventually finding its way into the Quran through a Syrian version. However, the supposed influence of the Syriac Legend on the Quran has been questioned based on dating inconsistencies and missing key motifs. While the Syriac Legend references the horns of Alexander, it consistently refers to the hero by his Greek name, not using a variant epithet. The use of the Islamic epithet , the "two-horned", first occurred in the Quran. The reasons behind the name "Two-Horned" are somewhat obscure: the scholar al-Tabari (839-923 CE) held it was because he went from one extremity ("horn") of the world to the other, but it may ultimately derive from the image of Alexander wearing the horns of the ram-god Zeus-Ammon, as popularised on coins throughout the Hellenistic Near East. The wall  builds on his northern journey may have reflected a distant knowledge of the Great Wall of China (the 12th century scholar al-Idrisi drew a map for Roger of Sicily showing the "Land of Gog and Magog" in Mongolia), or of various Sassanid Persian walls built in the Caspian area against the northern barbarians, or a conflation of the two. also journeys to the western and eastern extremities ("qarns", tips) of the Earth. Ernst claims that  finding the sun setting in a "muddy spring" in the West is equivalent to the "poisonous sea" found by Alexander in the Syriac legend. In the Syriac story Alexander tested the sea by sending condemned prisoners into it, while the Quran refers to this as a administration of justice. In the East both the Syrian legend and the Quran, according to Ernst, have Alexander/ find a people who live so close to the rising sun that they have no protection from its heat. Since Dhu al-Qarnayn is said to have lived near the time of Abraham, several medieval exegetes and historians did not identify him with Alexander to avoid the chronological discrepancy. Many medieval scholars have disputed the identification. Other notable Muslim commentators, including Ibn Kathir,:100-101 Ibn Taymiyyah:101 and Naser Makarem Shirazi, have also used theological arguments to reject the Alexander identification: that Alexander lived only a short time, whereas  (according to some) lived for 700 years as a sign of God's blessing, though this is not mentioned in the Quran;  worshipped only one God, while Alexander according to them was a polytheist, a view rejected by traditional Muslim scholars who identify him as . King Ṣaʿb Dhu-Marāthid 

The various campaigns of  mentioned in Q:18:83-101 have also been attributed to the South Arabian Himyarite King Ṣaʿb Dhu-Marāthid (also known as al-Rāʾid). According to Wahb ibn Munabbih, as quoted by Ibn Hisham, King Ṣaʿb was a conqueror who was given the epithet  after meeting al-Khidr in Jerusalem. He then travels to the ends of the earth, conquering or converting people until being led by al-Khidr through the land of darkness. According to Wheeler, it is possible that some elements of these accounts that were originally associated with Sa'b have been incorporated into stories which identify  with Alexander. Cyrus the Great 

In modern times, some Muslim scholars have argued in favour of  being actually Cyrus the Great, the founder of the Achaemenid Empire and conqueror of Persia and Babylon. Proponents of this view cite Daniel's vision in the Old Testament where he saw a two-horned ram that represents "the kings of Media and Persia" (). Archeological evidence cited includes the Cyrus Cylinder, which portrays Cyrus as a worshipper of the Babylonian god Marduk, who ordered him to rule the world and establish justice in Babylon. The cylinder states that idols that Nabonidus had brought to Babylon from various other Babylonian cities were reinstalled by Cyrus in their former sanctuaries and ruined temples reconstructed. Supported with other texts and inscriptions, Cyrus appears to have initiated a general policy of permitting religious freedom throughout his domains. A famous relief on a palace doorway pillar in Pasagardae depicts a winged figure wearing a Hemhem crown (a type of ancient Egyptian crown mounted on a pair of long spiral ram's horns). Some scholars take this to be a depiction of Cyrus due to an inscription that was once located above it, though most see it as a tutelary genie, or protective figure and note that the same inscription was also written on other palaces in the complex. This theory was proposed in 1855 by the German philologist G. M. Redslob, but it did not gain followers in the west. Among Muslim commentators, it was first promoted by Sayyed Ahmad Khan (d. 1889), then by Maulana Abul Kalam Azad, and generated wider acceptance over the years. Wheeler accepts the possibility but points out the absence of such a theory by classical Muslim commentators. Others 

Other persons who either were identified with the Quranic figure or given the title :

 Afrīqish al-Ḥimyarī, king of Himyar. Al-Biruni in his book, The Remaining Signs of Past Centuries, listed a number of figures whom people thought to be Dhu al-Qarnayn. He favoured the opinion that Dhu al-Qarnayn was the Yamani prince Afrīqish, who conquered the Mediterranean and established a city called Afrīqiah. He was called  because he ruled the lands of the rising and setting sun. To support his argument, al-Biruni cited Arabic onomastics, noting that compound names beginning with , such as  and , were common among the kings of Himyar. Fereydun. According to al-Tabari's Tarikh, some say Dhu al-Qarnayn the Elder (al-akbar), who lived in the era of Abraham, was the mythical Persian king Fereydun, who al-Tabari rendered as Afrīdhūn ibn Athfiyān. Imru'l-Qays (died 328 CE), a prince of the Lakhmids of southern Mesopotamia, an ally first of Persia and then of Rome, celebrated in romance for his exploits. Messiah ben Joseph, a fabulous military saviour expected by Yemenite Jews. Darius the Great. Kisrounis, Parthian king. See also
Gates of Alexander
Iron Gate (Central Asia)
Ergenekon

References

Sources

Further reading
 
 

 
Legendary Muslims
Alexander the Great in legend
Arabic words and phrases
Cultural depictions of Cyrus the Great
Cultural depictions of Alexander the Great
Islamic mythology
Mythological kings
People of the Quran
Pseudohistory