Surah 18

Surah 18:9

"Or did you think that the companions of the cave and al-Raqīm were an amazing thing among Our signs?"

In the following story (vv. 9–27), a number of young men take a stand for “the Lord of the heavens and the earth” (v. 14). In order to avoid harm from their idolatrous people, they seek refuge in a cave. There they sleep for 309 years, while their dog guards the entrance to the cave (v. 18). When the men wake up, they send one among them to the city to bring back food. The number of men is not certain (v. 23), and only God knows how long they slept in the cave (v. 27).

- from The Quran with Christian Commentary: A Guide to Understanding the Scripture of Islam

This story of the “companions of the cave” provides a clue about some of the sources for a variety of materials that found their way into the Quran. Most modern scholars draw attention to the Christian legend of the “seven sleepers of Ephesus,” which circulated in the Middle East in the sixth century and can be found today in two Syriac homilies attributed to Jacob of Serūgh. The Christian legend is about idolatry during the reign of the Roman emperor Decius, who ruled from AD 249–51. The young men are Christians who escaped prison in Ephesus and then sought refuge in a cave.

- from The Quran with Christian Commentary: A Guide to Understanding the Scripture of Islam