﴿وَكَذَلِكَ بَعَثْنَاهُمْ لِيَتَسَاءلُوا بَيْنَهُمْ قَالَ قَائِلٌ مِّنْهُمْ كَمْ لَبِثْتُمْ قَالُوا لَبِثْنَا يَوْماً أَوْ بَعْضَ يَوْمٍ قَالُوا رَبُّكُمْ أَعْلَمُ بِمَا لَبِثْتُمْ فَابْعَثُوا أَحَدَكُم بِوَرِقِكُمْ هَذِهِ إِلَى الْمَدِينَةِ فَلْيَنظُرْ أَيُّهَا أَزْكَى طَعَاماً فَلْيَأْتِكُم بِرِزْقٍ مِّنْهُ وَلْيَتَلَطَّفْ وَلَا يُشْعِرَنَّ بِكُمْ أَحَداً﴾ (الكهف: 19)
19 - As We have caused them to sleep in the cave, We made them wake up of their sleep so that some of them would ask the other: How long have you been asleep? They said: We slept for one or less day. When they looked to their hair and nails, they said: Allah is the most knowledgeable of the duration of your sleep. So, send someone of you with your silver dirhams to this city to bring some foods secretly so as no one would know your place.
﴿إِنَّهُمْ إِن يَظْهَرُوا عَلَيْكُمْ يَرْجُمُوكُمْ أَوْ يُعِيدُوكُمْ فِي مِلَّتِهِمْ وَلَن تُفْلِحُوا إِذاً أَبَداً﴾ (الكهف: 20)
20 - If they see you, they shall torture you until they kill you with stones or force you to enter their religion, and if you enter into their religion, you shall lose your religion and your Hereafter.
﴿وَكَذَلِكَ أَعْثَرْنَا عَلَيْهِمْ لِيَعْلَمُوا أَنَّ وَعْدَ اللَّهِ حَقٌّ وَأَنَّ السَّاعَةَ لَا رَيْبَ فِيهَا إِذْ يَتَنَازَعُونَ بَيْنَهُمْ أَمْرَهُمْ فَقَالُوا ابْنُوا عَلَيْهِم بُنْيَاناً رَّبُّهُمْ أَعْلَمُ بِهِمْ قَالَ الَّذِينَ غَلَبُوا عَلَى أَمْرِهِمْ لَنَتَّخِذَنَّ عَلَيْهِم مَّسْجِداً﴾ (الكهف: 21)
And so, just as We aroused them, it was that We disclosed them, [to] their people and the believers, that they, that is, their people, might know that God's promise, of resurrection, is true: by virtue of the fact that One Who has the power to make them sleep for [such] a long period of time, or sustain them in that state without nourishment, also has the power to resurrect the dead; and that, as for the Hour, there is no doubt, no uncertainty, concerning it. Behold! They were disputing, that is, the believers and the disbelievers, among themselves their affair, the affair of the youths, with regard to building something around them [as a monument]; so they, the disbelievers, said, 'Build over them, that is, around them, a building, to cover them up; their Lord knows them best.' Those who prevailed regarding their affair, the affair of the youths, namely, the believers, 'We will verily set up over them, around them, a place of worship', for prayers to be performed therein. And this indeed took place at the entrance of the cave.
﴿سَيَقُولُونَ ثَلَاثَةٌ رَّابِعُهُمْ كَلْبُهُمْ وَيَقُولُونَ خَمْسَةٌ سَادِسُهُمْ كَلْبُهُمْ رَجْماً بِالْغَيْبِ وَيَقُولُونَ سَبْعَةٌ وَثَامِنُهُمْ كَلْبُهُمْ قُل رَّبِّي أَعْلَمُ بِعِدَّتِهِم مَّا يَعْلَمُهُمْ إِلَّا قَلِيلٌ فَلَا تُمَارِ فِيهِمْ إِلَّا مِرَاء ظَاهِراً وَلَا تَسْتَفْتِ فِيهِم مِّنْهُمْ أَحَداً﴾ (الكهف: 22)
22 - People who differed about their number shall say: They are three and their fourth is the dog. Others will say: They are five and the six is their dog without a proof. Others will say: They are seven and their eighth is the dog. This is not a supposition, but this is true.
Say: My lord knows their number well and nothing is hidden from him, and none knows their number but the only few. It was authentically reported on the authority of Ibn `Abbas (may Allah be pleased with him) that their number is seven as reported by Ibn Kathir.