Dates: classical tafsīr, 8th–10th c. onward ·
background
Summary: Because Sūrat al-Kahf tells the story allusively, the Muslim commentators
(tafsīr) — al-Ṭabarī chief among them — filled it out from the surrounding lore, supplying names, a
king, a named dog, and a resolution of the number and the years. The sleepers became figures of Muslim devotion and
protection.
The Qur’anic account leaves the persecutor, the place, and the number unstated, and the commentators supplied them from the wider tradition. The persecuting king is named Daqyānūs (Decianus — the emperor Decius of the Christian legend); the city is identified with Ephesus (Afsūs); and the Qur’anic caution against quarrelling over the count (18:22) is generally resolved, in the commentaries, in favour of seven sleepers — the same total the Christian tradition had settled on.
— See al-Ṭabarī, Jāmiʿ al-bayān (Tafsīr) on Sūrat al-Kahf, and the summary in the 1913 Catholic Encyclopedia, “The Seven Sleepers of Ephesus.”
The sleepers’ dog, mentioned twice in the sura (18:18, 22), is honoured in the tradition with the name Qiṭmīr and is counted among the very few animals admitted to Paradise. Its name became a byword and a blessing: written on letters and documents, or worn as an amulet, “Qiṭmīr” was held to bring protection — a small but telling sign of how deeply the legend entered popular Muslim piety.
The Qur’anic term of “three hundred years, and exceeded by nine” (18:25) was harmonized by the commentators as three hundred solar years, equivalent to three hundred and nine lunar years — a neat reconciliation of the two figures, and a reminder that the exact span was already a puzzle the tradition felt it had to solve (as the Christian Golden Legend also would, arriving at a different total again).
As in Christendom, the legend attached itself to places. A cave of the Companions is shown at Ephesus, another at ar-Raqīm near Amman in Jordan (often linked to the Qur’anic al-raqīm, “the inscription” of 18:9), and still others were claimed across the Islamic world. The sleepers were invoked for protection and their story read for blessing — a devotion Louis Massignon documented at length. What al-raqīm actually means — “the inscription” or a place-name — and whether any of these caves has a real claim to be the sleepers’ own are weighed on their own pages: What is al-raqīm? (contested) and Does any site have a real claim to be the cave? (weak).
— Louis Massignon, Les sept dormants d’Éphèse (Ahl al-Kahf) en Islam et en chrétienté (Paris, 1955–1963).