Book Name:Iman Ki Salamti
2. They were asleep inside the cave, but in such a way that if someone would see them, he would deem them to be awake.
3. With the command of Allah Almighty, the sun would move to the right side of the cave while rising and to the left when setting; in this manner, despite lying in the open area of the cave, these pious bondsmen remained safe from the rays of the sun.
When Daqyanoos found out that some people have inhabited a cave in order to save themselves from polytheism, he gave the command to build a wall at the entrance of the cave so that they can never come out of it and die inside restlessly.
The person who was given the responsibility of building the wall by Daqyanoos was a pious individual. He could not get this decision overturned, hence, he wrote the names of the inhabitants of the cave on a tablet along with some details and placed it inside a box. Then, he preserved that box in the foundation of that wall.
Three hundred and nine years later, the Ashaab-e-Kahf woke up with the command of Allah Almighty during the reign of a pious and righteous king known as Baydroos. (Tafseer Khaazin, Part 15, Surah Al-Kahf, under the verse 18, vol. 3, pp. 198-203)
The account of Ashaab-e-Kahf, i.e. the People of the Cave, has been mentioned in the 15th part of the Quran, in the 9th verse of Surah Al-Kahf, in the following manner:
اَمْ حَسِبْتَ اَنَّ اَصْحٰبَ الْكَهْفِ وَ الرَّقِیْمِۙ-كَانُوْا مِنْ اٰیٰتِنَا عَجَبًا(۹)
Did you know that the People of the Cave and the People on the edge of the Forest were a wonderful sign of Ours?
[Kanz-ul-Iman (translation of Quran)] (Part 15, Surah Al-Kahf, Verse 9)
صَلُّوۡا عَلَى الۡحَبِيۡب صَلَّى اللّٰهُ عَلٰى مُحَمَّد