And you would have seen the sun, as it rose, inclining away from their cave to the right, and as it set, declining away from them to the left, while they lay in its open space. That is one of the signs of Allah. Whoever Allah guides is truly guided. But whoever He leaves to stray, you will never find for them a guiding mentor.And you would have thought they were awake, though they were asleep. We turned them over, to the right and left, while their dog stretched his forelegs at the entrance. Had you looked at them, you would have certainly fled away from them, filled with horror.(Quran 18:17~18). Surah Kahf
Al-Kahf (Arabic: الكهف, al-kahf; meaning: The Cave) is the 18th chapter (sūrah) of the Quran with 110 verses (āyāt).
click the button above to listen to the recitation of these Quranic verses again
۞ وَتَرَى ٱلشَّمۡسَ إِذَا طَلَعَت تَّزَ ٰوَرُ عَن كَهۡفِهِمۡ ذَاتَ ٱلۡیَمِینِ وَإِذَا غَرَبَت تَّقۡرِضُهُمۡ ذَاتَ ٱلشِّمَالِ وَهُمۡ فِی فَجۡوَةࣲ مِّنۡهُۚ ذَ ٰلِكَ مِنۡ ءَایَـٰتِ ٱللَّهِۗ مَن یَهۡدِ ٱللَّهُ فَهُوَ ٱلۡمُهۡتَدِۖ 
وَمَن یُضۡلِلۡ فَلَن تَجِدَ لَهُۥ وَلِیࣰّا مُّرۡشِدࣰا

وَتَحۡسَبُهُمۡ أَیۡقَاظࣰا وَهُمۡ رُقُودࣱۚ وَنُقَلِّبُهُمۡ ذَاتَ ٱلۡیَمِینِ وَذَاتَ ٱلشِّمَالِۖ وَكَلۡبُهُم بَـٰسِطࣱ ذِرَاعَیۡهِ بِٱلۡوَصِیدِۚ لَوِ ٱطَّلَعۡتَ عَلَیۡهِمۡ لَوَلَّیۡتَ مِنۡهُمۡ فِرَارࣰا وَلَمُلِئۡتَ مِنۡهُمۡ رُعۡبࣰا
There is a hadith in Sahih Muslim that states that Muhammad said (Concerning The False Messiah, Al-Masih ad-Dajjal):
“He who amongst you would survive to see him should recite over him the opening verses of Sura Kahf”
— Sahih Muslim, Book 41, Number 7015
تم انہیں غار میں دیکھتے تو تمہیں یوں نظر آتا کہ سورج جب نکلتا ہے تو ان کے غار کو چھوڑ کر دائیں جانب چڑھ جاتا ہے 
اور جب غروب ہوتا ہے تو ان سے بچ کر 
بائیں جانب اتر جاتا ہے 
اور وہ ہیں کہ غار کے اندر ایک وسیع جگہ میں پڑے ہیں 
یہ اللہ کی نشانیوں میں سے ایک ہے 

جس کو اللہ ہدایت دے 
وہی ہدایت پانے والا ہے 
اور جسے اللہ بھٹکا دے 
اس کے لیے تم کوئی ولی مرشد نہیں پا سکتے 

تم انہیں دیکھ کر یہ سمجھتے کہ 
وہ جاگ رہے ہیں، حالانکہ وہ سو رہے تھے 

ہم انہیں دائیں بائیں کروٹ دلواتے رہتے تھے
اور ان کا کتا غار کے دہانے پر ہاتھ پھیلائے بیٹھا تھا
 
اگر تم کہیں جھانک کر اُنہیں دیکھتے 
تو الٹے پاؤں بھاگ کھڑے ہوتے 
اور تم پر ان کے نظارے سے دہشت بیٹھ جاتی
This Surah was sent down in answer to three questions which the polytheists of Makkah in consultation with the People of the Book (the Jews and the Christians) put to the Prophet. These were:
Who were ‘The Sleepers of the Cave?’
What is the real story of Khidr?
What do you know about Dhul-Qarnain?
These three questions and their stories related to the history of the Christians and the Jews and were unknown in the Arabian Peninsula (Hijaz), so they were being used to test the divine knowledge revealed to the Prophet. However, God informed the Prophet of the complete answer to these questions and also employed the stories in the conflict between Islam and unbelief.
The questioners were told that the ‘Sleepers of the Cave’ believed in the same doctrine of Monotheism (Tawhid) which was being put forward in the Qur’an and that their condition was similar to that of the persecuted Muslims of Makkah. Also, the persecutors of the Sleepers of the Cave behaved in the same way as the disbelievers of Quraysh towards the Muslims. This particular story was a warning to the chiefs of Makkah, who were persecuting the small newly formed Muslim community. Additionally, the Prophet was instructed not to compromise with the persecutors nor consider the chiefs to be more important than his own followers. Likewise, the chiefs too were admonished and informed not to be distracted by the temporary life of this world but seek the eternal life of the hereafter.