“We were not created from gold or silver; rather, we were created from earth, and to the earth we shall return. So leave us as we were in the cave, upon the earth, until Allah raises us from it.” Thereupon the king ordered a coffin of teakwood to be made, and they were placed in it. When the people left them, Allah screened them from sight by inspiring terror, so that no one was able to enter upon them. The king then ordered a mosque to be built at the entrance of the cave, in which prayer would be offered, established a great festival for them, and ordered that it be observed every year.
It is also said that when Yamlīkha was brought before the righteous king, the king asked him, “Who are you?” He replied, “I am a man from the people of this city.” He mentioned that he had gone out yesterday, or a few days earlier, and described his home and certain people whom no one recognized. The king had heard that some young men had disappeared in ancient times, and that their names were written on a tablet kept in the treasury. So he summoned the tablet and examined their names, whereupon Yamlīkha proved to be one of those men. He mentioned the names of the others, and Yamlīkha said, “They are my companions.”
When the king heard this, he and the people with him mounted their rides. Upon reaching the entrance of the cave, Yamlīkha said, “Let me enter first to my companions and bring them the good news, for if they see you with me, you will frighten them.” So he entered and brought them the news; then Allah took their souls and concealed all trace of them, so that they could not find them. This is the meaning of His saying, glorified and exalted is He:
“When the young men sought refuge in the cave.”
That is, they went into the cave. It is said, “So-and-so sought refuge in such-and-such a place,” meaning that he took it as his dwelling. The cave was a grotto in Mount Banjalūs, and the name of the cave was Khayram. (1)
“They said, ‘Our Lord, grant us mercy from Yourself.’” The intended meaning of mercy is guidance in religion. It is also said to mean provision. “And make easy for us” means: facilitate for us. “Right guidance in our affair” means: that which is sought through Your good pleasure and in which lies our sound conduct. Ibn ʿAbbās said: “Right guidance” means a safe way out of the cave.
“So We sealed their ears in the cave for a number of years. Then We raised them up, so that We might make known which of the two groups was more precise in calculating the length of time they had remained.” (11–12)
“So We sealed their ears” means: We caused them to sleep and cast sleep upon them. It is also said to mean: We prevented sounds from reaching their hearing, for when a sleeping person hears a sound, he awakens. “In the cave for a number of years” means: We caused them to sleep for numbered years. The mention of number is for emphasis. It is also said that it indicates a great many years, since a small number is not ordinarily counted. “Then We raised them up,” that is, from their sleep, “so that We might make known”—that is, knowledge made manifest—“which of the two groups,” meaning the two parties, “was more precise in calculating the length of time they had remained.” This was because the people of the town disputed over how long they had remained in the cave.
The commentators differed regarding His saying, “was more precise in calculating the length of time they had remained”: that is, which group better retained the duration for which they had remained asleep in their cave. The word translated as “length of time” means an extent or limit. Mujāhid said that it means “a number,” and it is in the accusative case as an explanatory specification.