thumb|right|Silver [[tetradrachm of Alexander the Great shown wearing the horns of the ram-god Zeus-Ammon.]]

The story of Dhu al-Qarnayn (in Arabic ذو القرنين, literally "The Two-Horned One"; also transliterated as Zul-Qarnain or Zulqarnain), is mentioned in Surah al-Kahf of the Quran.

It has long been recognised in modern scholarship that the story of Dhu al-Qarnayn has strong similarities with the Syriac Legend of Alexander the Great. based on the view held by many Western and Muslim scholars that Surah 18 belongs to the second Meccan Period (615–619). The Syriac Legend of Alexander has however received a range of dates by different scholars, from a latest date of 630 The majority of modern researchers of the Quran as well as many Islamic commentators identify Dhu al-Qarnayn as Alexander the Great. As the Alexander romance persisted in popularity over the centuries, it was assumed by various neighbouring people. Of particular significance was its incorporation into Jewish and later Christian legendary traditions. In the Jewish tradition Alexander was initially a figure of satire, representing the vain or covetous ruler who is ignorant of larger spiritual truths. Yet their belief in a just, all-powerful God forced Jewish interpreters of the Alexander tradition to come to terms with Alexander's undeniable temporal success. Why would a just, all-powerful God show such favour to an unrighteous ruler? This theological need, plus acculturation to Hellenism, led to a more positive Jewish interpretation of the Alexander legacy. In its most neutral form this was typified by having Alexander show deference to either the Jewish people or the symbols of their faith. In having the great conqueror thus acknowledge the essential truth of the Jews' religious, intellectual, or ethical traditions, the prestige of Alexander was harnessed to the cause of Jewish ethnocentrism. Eventually Jewish writers would almost completely co-opt Alexander, depicting him as a righteous gentile or even a believing monotheist.

The Christianized peoples of the Near East, inheritors of both the Hellenic as well as Judaic strands of the Alexander romance, further theologized Alexander until in some stories he was depicted as a saint. The Christian legends turned the ancient Greek conqueror Alexander III into Alexander "the Believing King", implying that he was a believer in monotheism. Eventually elements of the Alexander romance were combined with Biblical legends such as Gog and Magog.

During the period of history during which the Alexander romance was written, little was known about the true historical Alexander the Great as most of the history of his conquests had been preserved in the form of folklore and legends. It was not until the Renaissance (1300–1600 AD) that the true history of Alexander III was rediscovered:

Dating and origins of the Alexander legends

thumb|An 11th-century [[Syriac language|Syriac manuscript. The Syriac language is a dialect of Middle Aramaic that was once spoken across much of the Fertile Crescent. Classical Syriac became a major literary language throughout the Middle East from the 4th to the 8th centuries, the classical language of Edessa, preserved in a large body of Syriac literature. Syriac became the vehicle of Eastern Orthodox Christianity and culture, spreading throughout Asia. Before Arabic became the dominant language, Syriac was a major language among the Assyrian Christian communities of the Middle East and Central Asia. Several Syriac manuscripts of the Alexander romance exist, dating from the 7th century. The Greek–Syriac translators are generally credited with introducing the works of the ancient Greeks to pre-Islamic Arabia.]]

The legendary Alexander material originated as early as the time of the Ptolemaic dynasty (305 BC to 30 BC) and its unknown authors are sometimes referred to as the Pseudo-Callisthenes (not to be confused with Callisthenes of Olynthus, who was Alexander's official historian). The earliest surviving manuscript of the Alexander romance, called the α (alpha) recension, can be dated to the 3rd century AD and was written in Greek in Alexandria:

The Greek variants of the Alexander romance continued to evolve until, in the 4th century, the Greek legend was translated into Latin by Julius Valerius Alexander Polemius (where it is called the Res gestae Alexandri Magni) and from Latin it spread to all major vernacular languages of Europe in the Middle Ages. Around the same as its translation into Latin, the Greek text was also translated into the Syriac language and from Syriac it spread to eastern cultures and languages as far afield as China and Southeast Asia. The Syriac legend was the source of an Arabic variant called the Qisas Dhul-Qarnayn (Tales of Dhul-Qarnayn) and a Persian variant called the (Book of Alexander), as well as Armenian and Ethiopic translations.

The Syriac manuscripts of the Alexander Romance contain evidence of lost texts. For example, there is some evidence of a lost pre-Islamic Arabic version of the translation that is thought to have been an intermediary between the Syriac Christian and the Ethiopic Christian translations. There is also evidence that the Syriac translation was not directly based on the Greek recensions but was based on a lost Middle Persian or (Neo-Persian) intermediary. The Syriac Legend appears in each of the six manuscripts containing the Syriac version of the Alexander Romance

The Syriac Legend has been generally dated to between 629 AD and 636 AD. There is evidence in the legend of " knowledge of the Khazar invasion of Armenia in A.D. 629", which suggests that the legend must have been burdened with additions by a redactor sometime around 629 AD. The legend appears to have been composed as propaganda in support of Emperor Heraclius (575–641 AD) shortly after he defeated the Persians in the Byzantine-Sassanid War of 602–628. It is notable that this manuscript fails to mention the Islamic conquest of Jerusalem in 636 AD by Muhammad's (570–632 AD) successor, Caliph Umar (590–644 AD). This fact means that the legend might have been recorded before the "cataclysmic event" that was the Muslim conquest of Syria and the resulting surrender of Jerusalem in November 636 AD. That the Byzantine–Arab Wars would have been referenced in the legend, had it been written after 636 AD, is supported by the fact that in 692 AD a Syriac Christian adaption of the Alexander romance called the Apocalypse of Pseudo-Methodius was indeed written as a response to the Muslim invasions and was falsely attributed to St Methodius (d. 311 AD); this Apocalypse of Pseudo-Methodius equated the evil nations of Gog and Magog with the Muslim invaders and shaped the eschatological imagination of Christendom for centuries.

One scholar (Kevin van Bladel) who finds striking similarities between the Quranic verses 18:83-102 and the Syriac legend in support of Emperor Heraclius, dates the work to 629–630 AD or before Muhammad's death, not 629–636 AD. not 20 verses. (The sun sets in a fetid poisonous ocean—not spring—surrounding the earth, Gog and Magog are Huns, etc.) Van Bladel finds it more plausible that the Syriac legend is the source of the Quranic verses than vice versa, both for linguistic reasons as well as because the Syriac legend was written before the Arab conquests when the Hijazi Muslim community was still remote from and little known to the Mesopotamian site of the legend's creation, whereas Arabs worked as troops and scouts for during the Byzantine–Sasanian War of 602–628 and could have been exposed to the legend.

Stephen Shoemaker, commenting on the views of Reinink, van Bladel, and Tesei, argues it more likely that most of the text of the current version of the legend existed in a sixth century version, given the stringent timings otherwise required for the legend to influence the Syriac metrical homily and Quranic versions, and the difficulty of otherwise explaining the presence of the first ex-eventu prophecy about the Sabir Hun invasion of 515 CE in the legend, which was already circulating as an apocalyptic revelation in John of Ephesus's Lives of the Eastern Saints in the sixth century CE.

Search for the water of life

Besides the Dhul Qarnayn episode, Surah al-Kahf contains another story which has been connected with legends in the Alexander romance tradition. Tommaso Tesei notes that the story of Alexander's search at the ends of the world for the water of life, featuring his cook and a fish, which appears in various forms in the Syriac metrical homily about Alexander mentioned above, recension β of the Alexander romance (4th/5th century) and in the Babylonian Talmud (Tamid 32a–32b), is "almost unanimously" considered by western scholars to be behind the story of Moses journeying to the junction of the two seas, his servant and the escaped fish earlier in Surah al-Kahf, verses 18:60–65. Besides the full English translation by E. A. W. Budge of both the Metrical Homily and the Syriac Legend,

Philological evidence

The two-horned one

right|thumb|Silver [[Ancient drachma|tetradrachmon (ancient Greek coin) issued in the name of Alexander the Great, depicting Alexander with the horns of Ammon-Ra (242/241 BC, posthumous issue). Displayed at the British Museum.]]

The literal translation of the Arabic phrase "Dhu al-Qarnayn", as written in the Quran, is "the two-horned man". Alexander the Great was portrayed in his own time with horns following the iconography of the Egyptian god Ammon-Ra, who held the position of transcendental, self-created creator deity "par excellence". Rams were a symbol of virility due to their rutting behaviour; the horns of Ammon may have also represented the East and West of the Earth, and one of the titles of Ammon was "the two-horned". Alexander was depicted with the horns of Ammon as a result of his conquest of ancient Egypt in 332 BC, where the priesthood received him as the son of the god Ammon, who was identified by the ancient Greeks with Zeus, the King of the Gods. The combined deity Zeus-Ammon was a distinct figure in ancient Greek mythology. According to five historians of antiquity (Arrian, Curtius, Diodorus, Justin, and Plutarch), Alexander visited the Oracle of Ammon at Siwa in the Libyan desert and rumours spread that the Oracle had revealed Alexander's father to be the deity Ammon, rather than Philip. Alexander is said by some to have been convinced of his own divinity:

Ancient Greek coins, such as the coins minted by Alexander's successor Lysimachus (360–281 BC), depict the ruler with the distinctive horns of Ammon on his head. Archaeologists have found a large number of different types of ancients coins depicting Alexander the Great with two horns. The 4th century BC silver ("four drachma") coin, depicting a deified Alexander with two horns, replaced the 5th century BC Athenian silver (which depicted the goddess Athena) as the most widely used coin in the Greek world. After Alexander's conquests, the drachma was used in many of the Hellenistic kingdoms in the Middle East, including the Ptolemaic kingdom in Alexandria. The Arabic unit of currency known as the dirham, known from pre-Islamic times up to the present day, inherited its name from the drachma. In the late 2nd century BC, silver coins depicting Alexander with ram horns were used as a principal coinage in Arabia and were issued by an Arab ruler by the name of Abi'el who ruled in the south-eastern region of the Arabian Peninsula.

right|thumb|7th century CE stele depicting [[Alexander the Great with horns discovered in 2018. Published by the Department of Antiquities, Cyprus.

In 1971, Ukrainian archeologist B. M. Mozolevskii discovered an ancient Scythian kurgan (burial mound) containing many treasures. The burial site was constructed in the 4th century BC near the city of Pokrov and is given the name Tovsta Mohyla (another name is Babyna Mogila). Amongst the artifacts excavated at this site were four silver gilded phalera (ancient Roman military medals). Two of the four medals are identical and depict the head of a bearded man with two horns, while the other two medals are also identical and depict the head of a clean-shaven man with two horns. According to a recent theory, the bearded figure with horns is actually Zeus-Ammon and the clean-shaved figure is none other than Alexander the Great.

Alexander has also been identified, since ancient times, with the horned figure in the Old Testament in the prophecy of Daniel 8 who overthrows the kings of Media and Persia. In the prophecy, Daniel has a vision of a ram with two long horns and verse 20 explains that "The ram which thou sawest having two horns is the kings of Media and Persia":