ThePeople of the Cave, according to many interpreters and historians, lived duringthe lifetime of a king called "Diqyanus" and they were sons of somenobles or kings. They met on a feast day and saw the rituals their people wereperforming in worship of the idols. At this very moment, Allah removed theveils from their hearts and they realized that their people were wrong-doers.Consequently, they deserted the religion of their people and resorted to theworship of Allah Alone. It is also said that each one of them when guided byAllah to the True Religion, abandoned his people and they coincidentallygathered in one place.
Imam Muslim transmitted in his Sahih the following PropheticHadith which supports this meaning: Abu Huraira reported Allah's Messenger(may peace be upon him) Saying: Souls are troops collected togetherand those who familiarised with each other (in the heaven from where thesecome) would have affinity, with one another (in the world) and those amongstthem who opposed each other (in the Heaven) would also be divergent (in theworld). (Book #032,Hadith #6376)
They asked one another about their affair and hence, they agreedon deserting and abandoning their people and fleeing with their true religion.
Scholars differed on the location of this cave. Some of themsaid: It is in the land of Aylah (i.e. Jerusalem). Others said: It is in theland of Ninawa (Iraq). And others said: it is in ash-Sham (Syrian territories).
However, On the sixties, an archaeologist called MuhammadTayseer Zabyan discovered a cave in Jordan, six miles away from Amman, in aregion called" Ar-Rajeeb" whose description goes with that which ismentioned in the verses. Sheikh Abu Al-A'la Al-Maududi visited it and agreedwith many scholars who viewed the same opinion.
سُوۡرَةُ الکهف [al-Kahf: 9-26]
بِسۡمِ ٱللهِ ٱلرَّحۡمَـٰنِ ٱلرَّحِيمِ
بِسۡمِ ٱللهِ ٱلرَّحۡمَـٰنِ ٱلرَّحِيمِ
أَمۡ حَسِبۡتَ أَنَّ أَصۡحَـٰبَ ٱلۡكَهۡفِ وَٱلرَّقِيمِ كَانُواْ مِنۡ ءَايَـٰتِنَا عَجَبًا (٩) إِذۡ أَوَى ٱلۡفِتۡيَةُ إِلَى ٱلۡكَهۡفِ فَقَالُواْ رَبَّنَآ ءَاتِنَا مِن لَّدُنكَ رَحۡمَةً۬ وَهَيِّئۡ لَنَا مِنۡ أَمۡرِنَا رَشَدً۬ا (١٠)فَضَرَبۡنَا عَلَىٰٓ ءَاذَانِهِمۡ فِى ٱلۡكَهۡفِ سِنِينَ عَدَدً۬ا (١١) ثُمَّ بَعَثۡنَـٰهُمۡ لِنَعۡلَمَ أَىُّ ٱلۡحِزۡبَيۡنِ أَحۡصَىٰ لِمَا لَبِثُوٓاْ أَمَدً۬ا (١٢) نَّحۡنُ نَقُصُّ عَلَيۡكَ نَبَأَهُم بِٱلۡحَقِّ*ۚ إِنَّہُمۡ فِتۡيَةٌ ءَامَنُواْ بِرَبِّهِمۡ وَزِدۡنَـٰهُمۡ هُدً۬ى (١٣) وَرَبَطۡنَا عَلَىٰ قُلُوبِهِمۡ إِذۡ قَامُواْ فَقَالُواْ رَبُّنَا رَبُّ ٱلسَّمَـٰوَٲتِ وَٱلۡأَرۡضِ لَن نَّدۡعُوَاْ مِن دُونِهِۦۤ إِلَـٰهً۬ا*ۖ لَّقَدۡ قُلۡنَآ إِذً۬ا شَطَطًا (١٤) هَـٰٓؤُلَآءِ قَوۡمُنَا ٱتَّخَذُواْ مِن دُونِهِۦۤ ءَالِهَةً۬*ۖ لَّوۡلَا يَأۡتُونَ عَلَيۡهِم بِسُلۡطَـٰنِۭ بَيِّنٍ۬*ۖ فَمَنۡ أَظۡلَمُ مِمَّنِ ٱفۡتَرَىٰ عَلَى ٱللَّهِ كَذِبً۬ا (١٥) وَإِذِ ٱعۡتَزَلۡتُمُوهُمۡ وَمَا يَعۡبُدُونَ إِلَّا ٱللَّهَ فَأۡوُ ۥۤاْ إِلَى ٱلۡكَهۡفِ يَنشُرۡ لَكُمۡ رَبُّكُم مِّن رَّحۡمَتِهِۦ وَيُهَيِّئۡ لَكُم مِّنۡ أَمۡرِكُم مِّرۡفَقً۬ا (١٦) ۞ وَتَرَى ٱلشَّمۡسَ إِذَا طَلَعَت تَّزَٲوَرُ عَن كَهۡفِهِمۡ ذَاتَ ٱلۡيَمِينِ وَإِذَا غَرَبَت تَّقۡرِضُہُمۡ ذَاتَ ٱلشِّمَالِ وَهُمۡ فِى فَجۡوَةٍ۬ مِّنۡهُ*ۚ ذَٲلِكَ مِنۡ ءَايَـٰتِ ٱللَّهِ*ۗ مَن يَہۡدِ ٱللَّهُ فَهُوَ ٱلۡمُهۡتَدِ*ۖ وَمَن يُضۡلِلۡ فَلَن تَجِدَ لَهُ ۥ وَلِيًّ۬ا مُّرۡشِدً۬ا (١٧) وَتَحۡسَبُہُمۡ أَيۡقَاظً۬ا وَهُمۡ رُقُودٌ۬*ۚ وَنُقَلِّبُهُمۡ ذَاتَ ٱلۡيَمِينِ وَذَاتَ ٱلشِّمَالِ*ۖ وَكَلۡبُهُم بَـٰسِطٌ۬ ذِرَاعَيۡهِ بِٱلۡوَصِيدِ*ۚ لَوِ ٱطَّلَعۡتَ عَلَيۡہِمۡ لَوَلَّيۡتَ مِنۡهُمۡ فِرَارً۬ا وَلَمُلِئۡتَ مِنۡہُمۡ رُعۡبً۬ا (١٨) وَڪَذَٲلِكَ بَعَثۡنَـٰهُمۡ لِيَتَسَآءَلُواْ بَيۡنَہُمۡ*ۚ قَالَ قَآٮِٕلٌ۬ مِّنۡہُمۡ ڪَمۡ لَبِثۡتُمۡ*ۖ قَالُواْ لَبِثۡنَا يَوۡمًا أَوۡ بَعۡضَ يَوۡمٍ۬*ۚ قَالُواْ رَبُّكُمۡ أَعۡلَمُ بِمَا لَبِثۡتُمۡ فَٱبۡعَثُوٓاْ أَحَدَڪُم بِوَرِقِكُمۡ هَـٰذِهِۦۤ إِلَى ٱلۡمَدِينَةِ فَلۡيَنظُرۡ أَيُّہَآ أَزۡكَىٰ طَعَامً۬ا فَلۡيَأۡتِڪُم بِرِزۡقٍ۬ مِّنۡهُ وَلۡيَتَلَطَّفۡ وَلَا يُشۡعِرَنَّ بِڪُمۡ أَحَدًا (١٩) إِنَّہُمۡ إِن يَظۡهَرُواْ عَلَيۡكُمۡ يَرۡجُمُوكُمۡ أَوۡ يُعِيدُوڪُمۡ فِى مِلَّتِهِمۡ وَلَن تُفۡلِحُوٓاْ إِذًا أَبَدً۬ا (٢٠) وَڪَذَٲلِكَ أَعۡثَرۡنَا عَلَيۡہِمۡ لِيَعۡلَمُوٓاْ أَنَّ وَعۡدَ ٱللَّهِ حَقٌّ۬ وَأَنَّ ٱلسَّاعَةَ لَا رَيۡبَ فِيهَآ إِذۡ يَتَنَـٰزَعُونَ بَيۡنَہُمۡ أَمۡرَهُمۡ*ۖ فَقَالُواْ ٱبۡنُواْ عَلَيۡہِم بُنۡيَـٰنً۬ا*ۖ رَّبُّهُمۡ أَعۡلَمُ بِهِمۡ*ۚ قَالَ ٱلَّذِينَ غَلَبُواْ عَلَىٰٓ أَمۡرِهِمۡ لَنَتَّخِذَنَّ عَلَيۡہِم مَّسۡجِدً۬ا (٢١)سَيَقُولُونَ ثَلَـٰثَةٌ۬ رَّابِعُهُمۡ كَلۡبُهُمۡ وَيَقُولُونَ خَمۡسَةٌ۬ سَادِسُہُمۡ كَلۡبُہُمۡ رَجۡمَۢا بِٱلۡغَيۡبِ*ۖ وَيَقُولُونَ سَبۡعَةٌ۬ وَثَامِنُہُمۡ ڪَلۡبُہُمۡ*ۚ قُل رَّبِّىٓ أَعۡلَمُ بِعِدَّتِہِم مَّا يَعۡلَمُهُمۡ إِلَّا قَلِيلٌ۬*ۗ فَلَا تُمَارِ فِيہِمۡ إِلَّا مِرَآءً۬ ظَـٰهِرً۬ا وَلَا تَسۡتَفۡتِ فِيهِم مِّنۡهُمۡ أَحَدً۬ا (٢٢) وَلَا تَقُولَنَّ لِشَاْىۡءٍ إِنِّى فَاعِلٌ۬ ذَٲلِكَ غَدًا (٢٣) إِلَّآ أَن يَشَآءَ ٱللَّهُ*ۚ وَٱذۡكُر رَّبَّكَ إِذَا نَسِيتَ وَقُلۡ عَسَىٰٓ أَن يَهۡدِيَنِ رَبِّى لِأَقۡرَبَ مِنۡ هَـٰذَا رَشَدً۬ا (٢٤) وَلَبِثُواْ فِى كَهۡفِهِمۡ ثَلَـٰثَ مِاْئَةٍ۬ سِنِينَ وَٱزۡدَادُواْ تِسۡعً۬ا (٢٥) قُلِ ٱللَّهُ أَعۡلَمُ بِمَا لَبِثُواْ*ۖ لَهُ ۥ غَيۡبُ ٱلسَّمَـٰوَٲتِ وَٱلۡأَرۡضِ*ۖ أَبۡصِرۡ بِهِۦ وَأَسۡمِعۡ*ۚ مَا لَهُم مِّن دُونِهِۦ مِن وَلِىٍّ۬ وَلَا يُشۡرِكُ فِى حُكۡمِهِۦۤ أَحَدً۬ا (٢٦
This was common in the previous eras and periods prior to Prophet Muhammad (Peace be upon him). But, Islam rejects this deed (building places of worship over the graves of anyone even if it is a Prophet): Narrated Abu Huraira: Allah's Apostle said, "May Allah's curse be on the Jews for they built the places of worship at the graves of their Prophets." (Book #8, Hadith #428)
Abu Huraira reported Allah's Prophet (may peace be upon him) as saying that Sulaiman b. Dawud, the Apostle of Allah, observed: I will have an intercourse with seventy wives during the night; all of them will give birth to a male child who will fight in the cause of Allah. His companion or the ang I said to him: Say," If God wills." But he (Hadrat Sulaimin) did not say so, and he forgot it. And none of his wives gave birth to a child, but one who gave birth to a premature child. Allah's Messenger (may peace be upon him) said: Had he said Insha' Allah (if God so will). he would not have failed and his desire would have been materialised. (Book #015, Hadith#4067)
Source