1. QASAS
  2. Blog

The People of the Cave Story for Kids: The Young Men Who Slept for 309 Years

A warm, simple retelling of Ashab al-Kahf for children aged 4 to 12, with the moral, the du'a of the cave to learn together and three questions to talk about, and nothing added to the Quran.

By QASAS19 min read

The young men of the cave and their dog seen from behind at the mouth of the cave, raising their hands under the moon

This is the people of the cave story for kids, told the way the Quran tells it in Surah al-Kahf, "The Cave". Children love it straight away: a group of brave young friends, a secret cave in the mountains, a loyal dog lying at the door, and a sleep so long that when they woke up the whole world had changed. It is also one of the best Quran stories for teaching a child to stand firm, to ask Allah for help, and to say "in sha Allah".

Everything on this page comes from the Quran (Surah al-Kahf 18:9-26) and from the classical tafsir of Ibn Kathir, al-Sa'di and al-Tafsir al-Muyassar. We have not given the young men or their dog names, invented conversations, or added the colourful extras found in some storybooks, because children deserve the true story. Where the Quran does not tell us something, we say so.

If you want every ayah with the full tafsir discussion, including what al-Raqim means and how the scholars explained the 309 years, read our complete People of the Cave story from Surah al-Kahf. This page is the one to read aloud.

How to use this page

Read the story section aloud, one part at a time, and stop at the pictures. The sentences are short on purpose, so you can read slowly and let your child look and ask questions. Each ayah box shows the Arabic with its English meaning; read the English, and if your child is learning Quran, point to the Arabic words.

After the story you will find the moral in one sentence, three questions to talk about, a guide for different ages, the du'a of the young men to learn together, and honest answers to the questions children ask most. Teachers can use the FAQ at the end for the questions that come up in class.

The People of the Cave story for children

Young friends who loved Allah

A long, long time ago, in a town far away, there lived a few young men. They were not prophets. They were ordinary young people, like big brothers or cousins. But they had something very special in their hearts: they believed in Allah, the One who made the sky and the earth.

The people of their town did not. They made idols with their own hands and bowed down to them. Ibn Kathir tells us that the people had a ruler who wanted everyone to worship these idols. The Quran does not tell us his name, and we do not need it.

Allah tells us about these young friends Himself:

﴿نَّحْنُ نَقُصُّ عَلَيْكَ نَبَأَهُم بِٱلْحَقِّ ۚ إِنَّهُمْ فِتْيَةٌ ءَامَنُوا۟ بِرَبِّهِمْ وَزِدْنَـٰهُمْ هُدًى ١٣ وَرَبَطْنَا عَلَىٰ قُلُوبِهِمْ إِذْ قَامُوا۟ فَقَالُوا۟ رَبُّنَا رَبُّ ٱلسَّمَـٰوَٰتِ وَٱلْأَرْضِ لَن نَّدْعُوَا۟ مِن دُونِهِۦٓ إِلَـٰهًا ۖ لَّقَدْ قُلْنَآ إِذًا شَطَطًا ١٤﴾

(13) It is We who relate to you, [O Muḥammad], their story in truth. Indeed, they were youths who believed in their Lord, and We increased them in guidance. (14) And We bound [i.e., made firm] their hearts when they stood up and said, "Our Lord is the Lord of the heavens and the earth. Never will we invoke besides Him any deity. We would have certainly spoken, then, an excessive transgression.

Surah Al-Kahf (18:13–14) · Saheeh International

Allah says they were “youths who believed in their Lord, and We increased them in guidance” (Quran 18:13). Because they believed sincerely, Allah made their faith grow even stronger. And when they had to speak, Allah made their hearts firm, so they were not afraid.

Standing up for the truth

The young men stood up and said it clearly: “Our Lord is the Lord of the heavens and the earth” (Quran 18:14). We will never pray to anyone else.

Al-Tafsir al-Muyassar explains that they said this while standing in front of the king who was blaming them for leaving the idols. Think how brave that was! Everyone around them believed something else, and they still said the truth out loud.

Then they asked a very clever question about the idols: “Why do they not bring for [worship of] them a clear evidence?” (Quran 18:15) In simple words: where is your proof? An idol cannot make anything, not even a single flower. Al-Sa'di explains that they reasoned it out: Allah alone made the heavens and the earth, so Allah alone deserves to be worshipped.

Going to the cave

But staying in the town was not safe. The young men were afraid that their people would force them to give up their faith. So they made a plan together. They said to one another:

﴿وَإِذِ ٱعْتَزَلْتُمُوهُمْ وَمَا يَعْبُدُونَ إِلَّا ٱللَّهَ فَأْوُۥٓا۟ إِلَى ٱلْكَهْفِ يَنشُرْ لَكُمْ رَبُّكُم مِّن رَّحْمَتِهِۦ وَيُهَيِّئْ لَكُم مِّنْ أَمْرِكُم مِّرْفَقًا ١٦﴾

(16) [The youths said to one another], "And when you have withdrawn from them and that which they worship other than Allāh, retreat to the cave. Your Lord will spread out for you of His mercy and will prepare for you from your affair facility."

Surah Al-Kahf (18:16) · Saheeh International

They would leave the idols behind and go to a cave, trusting that “Your Lord will spread out for you of His mercy” (Quran 18:16). Al-Muyassar explains that it was a cave in a mountain, where they could worship their Lord alone.

So they left. They climbed up the mountain, and with them went their dog.

The young men and their dog walking away from a town of lights at night, seen from behind
The young men and their dog walking away from a town of lights at night, seen from behind
The young men and their dog climbing toward a remote cave in the mountains, seen from behind
The young men and their dog climbing toward a remote cave in the mountains, seen from behind

The du'a in the cave

When they reached the cave, they turned to Allah and asked Him for help. This is their du'a, and it is in the Quran:

﴿إِذْ أَوَى ٱلْفِتْيَةُ إِلَى ٱلْكَهْفِ فَقَالُوا۟ رَبَّنَآ ءَاتِنَا مِن لَّدُنكَ رَحْمَةً وَهَيِّئْ لَنَا مِنْ أَمْرِنَا رَشَدًا ١٠﴾

(10) [Mention] when the youths retreated to the cave and said, "Our Lord, grant us from Yourself mercy and prepare for us from our affair right guidance."

Surah Al-Kahf (18:10) · Saheeh International

They said: “Our Lord, grant us from Yourself mercy and prepare for us from our affair right guidance.” (Quran 18:10) Ibn Kathir explains that they were asking for mercy that would protect them and hide them from their people, and for their story to end in a good and right way.

The young men of the cave raising their hands in du'a, seen from behind
The young men of the cave raising their hands in du'a, seen from behind

Al-Sa'di points out something beautiful. The young men did two things at once. They did what they could do, by going somewhere safe. And they asked Allah for help, without relying on themselves. That is why, al-Sa'di says, Allah answered their du'a.

A very, very long sleep

And Allah answered in a way no one could have imagined. He made them fall asleep. Not for one night. Not for one week. For years and years:

“So We cast [a cover of sleep] over their ears within the cave for a number of years” (Quran 18:11).

All that time, Allah looked after them. The Quran describes it like a picture:

﴿۞ وَتَرَى ٱلشَّمْسَ إِذَا طَلَعَت تَّزَٰوَرُ عَن كَهْفِهِمْ ذَاتَ ٱلْيَمِينِ وَإِذَا غَرَبَت تَّقْرِضُهُمْ ذَاتَ ٱلشِّمَالِ وَهُمْ فِى فَجْوَةٍ مِّنْهُ ۚ ذَٰلِكَ مِنْ ءَايَـٰتِ ٱللَّهِ ۗ مَن يَهْدِ ٱللَّهُ فَهُوَ ٱلْمُهْتَدِ ۖ وَمَن يُضْلِلْ فَلَن تَجِدَ لَهُۥ وَلِيًّا مُّرْشِدًا ١٧ وَتَحْسَبُهُمْ أَيْقَاظًا وَهُمْ رُقُودٌ ۚ وَنُقَلِّبُهُمْ ذَاتَ ٱلْيَمِينِ وَذَاتَ ٱلشِّمَالِ ۖ وَكَلْبُهُم بَـٰسِطٌ ذِرَاعَيْهِ بِٱلْوَصِيدِ ۚ لَوِ ٱطَّلَعْتَ عَلَيْهِمْ لَوَلَّيْتَ مِنْهُمْ فِرَارًا وَلَمُلِئْتَ مِنْهُمْ رُعْبًا ١٨﴾

(17) And [had you been present], you would see the sun when it rose, inclining away from their cave on the right, and when it set, passing away from them on the left, while they were [lying] within an open space thereof. That was from the signs of Allāh. He whom Allāh guides is the [rightly] guided, but he whom He sends astray - never will you find for him a protecting guide. (18) And you would think them awake, while they were asleep. And We turned them to the right and to the left, while their dog stretched his forelegs at the entrance. If you had looked at them, you would have turned from them in flight and been filled by them with terror.

Surah Al-Kahf (18:17–18) · Saheeh International

Let us look at the picture together, one piece at a time.

The sun. When the sun rose in the morning, it moved away from the cave on one side. When it set in the evening, it passed them by on the other side. Al-Sa'di explains that the hot sun never touched them, and fresh air could still come into the wide space where they lay. The Quran says this was “from the signs of Allāh” (Quran 18:17).

Asleep, but looking awake. “And you would think them awake, while they were asleep” (Quran 18:18). Ibn Kathir and al-Sa'di mention the explanation of the scholars that their eyes were open, so anyone looking at them would think they were awake.

Turning in their sleep. Allah turned them onto their right side and their left side. Ibn Kathir reports from the early scholars that this kept the ground from harming their bodies. Allah was taking care of every little detail.

The faithful dog. And at the door of the cave lay their dog: “their dog stretched his forelegs at the entrance” (Quran 18:18). Ibn Kathir explains that the dog lay at the doorway the way dogs do, as if guarding them, and it slept the same long sleep. Ibn Kathir says the blessing of these good young men reached even their dog, which is now mentioned in the Quran. That is what good friends do: their goodness reaches the ones around them.

No one came near. The Quran says that if someone had looked inside, they would have run away afraid. Ibn Kathir explains that Allah gave the sleepers a kind of awe, so no one would come close or disturb them until the right time.

The young men asleep in the cave while the light of the sun turns away from them, seen from behind
The young men asleep in the cave while the light of the sun turns away from them, seen from behind

Waking up

Then one day, Allah woke them up. They sat up and looked at each other. One of them asked, "How long have we been here?"

﴿وَكَذَٰلِكَ بَعَثْنَـٰهُمْ لِيَتَسَآءَلُوا۟ بَيْنَهُمْ ۚ قَالَ قَآئِلٌ مِّنْهُمْ كَمْ لَبِثْتُمْ ۖ قَالُوا۟ لَبِثْنَا يَوْمًا أَوْ بَعْضَ يَوْمٍ ۚ قَالُوا۟ رَبُّكُمْ أَعْلَمُ بِمَا لَبِثْتُمْ فَٱبْعَثُوٓا۟ أَحَدَكُم بِوَرِقِكُمْ هَـٰذِهِۦٓ إِلَى ٱلْمَدِينَةِ فَلْيَنظُرْ أَيُّهَآ أَزْكَىٰ طَعَامًا فَلْيَأْتِكُم بِرِزْقٍ مِّنْهُ وَلْيَتَلَطَّفْ وَلَا يُشْعِرَنَّ بِكُمْ أَحَدًا ١٩﴾

(19) And similarly, We awakened them that they might question one another. Said a speaker from among them, "How long have you remained [here]?" They said, "We have remained a day or part of a day." They said, "Your Lord is most knowing of how long you remained. So send one of you with this silver coin of yours to the city and let him look to which is the best of food and bring you provision from it and let him be cautious. And let no one be aware of you.

Surah Al-Kahf (18:19) · Saheeh International

Some of them answered: “We have remained a day or part of a day” (Quran 18:19). Ibn Kathir explains that they had gone into the cave early in the day and woke up late in the day, so it felt like just one day. But they were not sure, so they said something very wise: “Your Lord is most knowing of how long you remained” (Quran 18:19). When you do not know something, you leave it to Allah, who knows everything.

They were hungry. So they sent one of them into the town with their silver coins to buy the best, cleanest food. They told him “let him be cautious” (Quran 18:19): be gentle and careful, and do not let anyone know where we are. As far as they knew, their people were still the same people who wanted to hurt them.

The surprise in the town

But the town was not the same any more. So many years had passed! Al-Tafsir al-Muyassar explains that when the young man paid with his coins, the seller noticed what kind of coins they were. They were very, very old. And so the people of that time found out about the young men of the cave.

Why did Allah let them be found? The Quran tells us:

﴿وَكَذَٰلِكَ أَعْثَرْنَا عَلَيْهِمْ لِيَعْلَمُوٓا۟ أَنَّ وَعْدَ ٱللَّهِ حَقٌّ وَأَنَّ ٱلسَّاعَةَ لَا رَيْبَ فِيهَآ إِذْ يَتَنَـٰزَعُونَ بَيْنَهُمْ أَمْرَهُمْ ۖ فَقَالُوا۟ ٱبْنُوا۟ عَلَيْهِم بُنْيَـٰنًا ۖ رَّبُّهُمْ أَعْلَمُ بِهِمْ ۚ قَالَ ٱلَّذِينَ غَلَبُوا۟ عَلَىٰٓ أَمْرِهِمْ لَنَتَّخِذَنَّ عَلَيْهِم مَّسْجِدًا ٢١﴾

(21) And similarly, We caused them to be found that they [who found them] would know that the promise of Allāh is truth and that of the Hour there is no doubt. [That was] when they disputed among themselves about their affair and [then] said, "Construct over them a structure. Their Lord is most knowing about them." Said those who prevailed in the matter, "We will surely take [for ourselves] over them a masjid."

Surah Al-Kahf (18:21) · Saheeh International

Allah let people find them so that they would know “that the promise of Allāh is truth” (Quran 18:21). Ibn Kathir explains that some people at that time doubted that Allah would bring people back to life after they die. Now they could see it with their own eyes: young men who had slept for hundreds of years and woke up again. If Allah can do that, He can bring everyone back on the Day of Judgement.

How long did they sleep?

At the end of the story, Allah tells us exactly how long it was:

﴿وَلَبِثُوا۟ فِى كَهْفِهِمْ ثَلَـٰثَ مِا۟ئَةٍ سِنِينَ وَٱزْدَادُوا۟ تِسْعًا ٢٥﴾

(25) And they remained in their cave for three hundred years and exceeded by nine.

Surah Al-Kahf (18:25) · Saheeh International

“three hundred years and exceeded by nine” (Quran 18:25): that is 309 years! Ibn Kathir explains why the Quran says "three hundred" and then "nine more": 309 years counted by the moon are the same as 300 years counted by the sun. Ask your child to count how many grandparents and great-grandparents fit into 309 years. It is a very long time.

The moral of the People of the Cave story for kids

The moral of the people of the cave story is this: stay true to Allah even when everyone around you does something else, and ask Allah for help, because He takes care of those who turn to Him. That is the one sentence to leave your child with. The young men were few and their people were many, but Allah protected them in ways nobody could have planned.

There are smaller lessons inside the big one, each easy to say in a child's words:

Three questions to talk about after the story

Talking about the story is where the lesson sticks. Here are three questions for children, with what to listen for and a short true answer you can give if they get stuck.

1. Why did the young men leave their town and go to the cave? Listen for: their people worshipped idols and wanted them to do the same, and they wanted to keep their faith in Allah safe. Then ask: "Was it easy to leave their homes?" No, it was hard, but they loved Allah more. Follow-up: "Is there something you do because Allah loves it, even when your friends do not?"

2. What did they say to Allah when they reached the cave? Listen for: they asked Allah for mercy and to guide them. Read the ayah again (18:10) and say it together. Al-Sa'di explains that they did their best and then trusted Allah, and that is why Allah answered them. Follow-up: "When you are worried about something, what can you ask Allah?"

3. How did Allah look after them while they slept? Listen for: the sun moved away from them, Allah turned them from side to side, the dog lay at the door, and no one came near them. Children often remember the dog first, and that is fine. Follow-up: "Allah took care of them while they were fast asleep. Who takes care of you when you are asleep?" This is a gentle way to talk about trusting Allah at bedtime.

Telling the People of the Cave story by age

The People of the Cave story works for every age, as long as you choose what to focus on. The facts stay the same; what changes is how much you tell.

Ages 4 to 6. Tell it very simply: some young men loved Allah, but their town did not. They went to a cave with their dog and asked Allah for help. Allah made them sleep for a very, very long time and took care of them, and then He woke them up. Use the four pictures above, and let your child point to the dog. End by saying the first words of their du'a together: "Rabbana atina min ladunka rahmah."

Ages 7 to 9. Add the brave words they said in front of the king, the sun moving away from the cave, the turning from side to side, waking up hungry and the old silver coins. Ask all three questions. Children this age love the surprise in the town, when the coins gave the secret away.

Ages 10 to 12. Read the whole passage, 18:9-26, and talk about why Allah let people find them: to show that the promise of the Day of Judgement is true (18:21). Show them the "number puzzle" in 18:22, where people guess three, five or seven, and the most important answer: “My Lord is most knowing of their number.” (Quran 18:22) Older children can read the ayat in a mushaf with tafsir and compare al-Muyassar with the story they heard. For the full account, go to the complete People of the Cave story with tafsir.

For every age: no made-up names for the young men, the king or the dog, no invented conversations, and no pictures of faces. The Quran's version already has a secret cave, a guarding dog, a moving sun and a 309-year sleep; it does not need extras.

Teach your child the du'a of the People of the Cave

The du'a of the young men is short, beautiful and easy for children to learn. It is a du'a for any moment when you are worried or do not know what to do next:

Rabbana atina min ladunka rahmatan wa hayyi' lana min amrina rashada. The meaning: “Our Lord, grant us from Yourself mercy and prepare for us from our affair right guidance.” (Quran 18:10)

A simple way to teach it over one week:

  1. Days 1 and 2. Say it once at bedtime, in Arabic, then in English. Let them listen only.
  2. Days 3 and 4. Say it in small pieces and let them repeat: Rabbana atina / min ladunka rahmah / wa hayyi' lana / min amrina rashada.
  3. Days 5 to 7. Let them say it on their own, then ask: "What is rahmah?" (mercy, Allah's kindness and care). Children love knowing they are using the very words the young men said in the cave.

Tell them when to use it: before a test, on the first day at a new school, before a journey, or any time they feel unsure. Our article on tawakkul in the stories of the prophets explains, for parents, how doing your part and trusting Allah go together.

Teach "in sha Allah" with this story

In the middle of the story, the Quran teaches a little rule that children can use every day:

﴿وَلَا تَقُولَنَّ لِشَا۟ىْءٍ إِنِّى فَاعِلٌ ذَٰلِكَ غَدًا ٢٣ إِلَّآ أَن يَشَآءَ ٱللَّهُ ۚ وَٱذْكُر رَّبَّكَ إِذَا نَسِيتَ وَقُلْ عَسَىٰٓ أَن يَهْدِيَنِ رَبِّى لِأَقْرَبَ مِنْ هَـٰذَا رَشَدًا ٢٤﴾

(23) And never say of anything, "Indeed, I will do that tomorrow," (24) Except [when adding], "If Allāh wills." And remember your Lord when you forget [it] and say, "Perhaps my Lord will guide me to what is nearer than this to right conduct."

Surah Al-Kahf (18:23–24) · Saheeh International

When we plan to do something tomorrow, we add “If Allāh wills.” (Quran 18:24) Ibn Kathir explains that this is good manners with Allah, because only He knows what tomorrow will bring. And if we forget to say it? “And remember your Lord when you forget” (Quran 18:24): we say it as soon as we remember.

A fun way to practise: for one week, every time your child says "Tomorrow I will...", smile and wait. See if they remember to add "in sha Allah" by themselves. Children enjoy catching their parents forgetting too.

What the Quran does not tell us (and how to answer)

Children ask great questions, and the honest answer to some of them is "the Quran does not say". Here is how to handle the common ones without inventing anything.

Teaching a child to say "the Quran does not tell us" is a gift. Al-Sa'di calls arguments about the number a disagreement with no benefit. It teaches children to love the Quran as it is, and not to mix it with stories that were added later.

The story at a glance

PartWhat happensWhere in the Quran
The young menA few young believers in a town of idol worshippers18:13
Standing firm"Our Lord is the Lord of the heavens and the earth"18:14-15
The planThey decide to go to the cave and trust Allah's mercy18:16
The du'a"Our Lord, grant us from Yourself mercy"18:10
The sleepThe sun turns away, they are turned side to side, the dog at the door18:11, 18:17-18
Waking up"A day or part of a day"; one of them goes to buy food18:19-20
FoundPeople see that Allah's promise is true18:21
How manyAllah knows their number best18:22
In sha AllahNever say "I will do it tomorrow" without "if Allah wills"18:23-24
How long309 years18:25

Watch and read The Sleepers of the Cave in QASAS

The Sleepers of the CaveWatch this story in QASASThe Sleepers of the CaveYoung men fled a tyrant king and slept for 309 years.Open on Google Play →

QASAS is a free prophet stories app that tells this story as a short cinematic episode called "The Sleepers of the Cave": the young men leaving the town with their dog, the climb up the mountain, the du'a at the mouth of the cave and the long sleep. Your child can watch it, or read it page by page with you, and then answer a quick quiz at the end to see what they remember. There are no faces, no ads, no account and no tracking, and the stories come in 11 languages.

It is a calm way to do Islamic stories for kids at bedtime: watch the episode, read this page, ask the three questions and learn the du'a of the cave together. Because the story lives in Surah al-Kahf, the same Quran stories app also has the full mushaf with tafsir and a Friday reminder to read al-Kahf, along with prayer times, the qibla, a 3D tasbih and adhkar. QASAS is live on Google Play for Android and on the App Store for iPhone. Families who read al-Kahf every week can use our guide to reading Surah al-Kahf on Friday.

Good stories to tell next, at the same age: the story of Prophet Yunus for kids, about the du'a in the dark, and the story of Prophet Sulayman for kids, about the little ant and the hoopoe.

Frequently asked questions

What is the People of the Cave story for kids in short?

The People of the Cave were a few young men who believed in Allah when their people worshipped idols. They went to a cave with their dog to keep their faith safe and asked Allah for mercy. Allah made them sleep for 309 years, looked after them, and woke them up as a sign that His promise of the Day of Judgement is true (Quran 18:9-26).

What is the moral of the story of the People of the Cave?

The moral is to stay true to Allah even when everyone around you does something else, and to turn to Him for help. The young men did what they could by going somewhere safe, then asked Allah for mercy, and Allah protected them. Smaller lessons are to choose good friends, to ask for proof, and to say "in sha Allah".

How long did the People of the Cave sleep?

The People of the Cave slept for 309 years. The Quran says they stayed in their cave “three hundred years and exceeded by nine” (Quran 18:25). Ibn Kathir explains that 309 years counted by the moon equal 300 years counted by the sun.

What is the du'a of the People of the Cave?

Their du'a is: “Our Lord, grant us from Yourself mercy and prepare for us from our affair right guidance.” (Quran 18:10) In Arabic it begins Rabbana atina min ladunka rahmah. It is a good du'a for children to learn for any time they feel worried or unsure.

Did the People of the Cave have a dog?

Yes. The Quran says “their dog stretched his forelegs at the entrance” (Quran 18:18) of the cave. Ibn Kathir explains that the dog lay at the doorway as if guarding them and slept the same long sleep. The Quran does not give the dog a name.

How many People of the Cave were there?

The Quran says Allah knows their number best. People guessed three, five or seven, and the Quran calls the first two guesses "guessing at the unseen"; Ibn Kathir and al-Sa'di say this points to seven, and Allah knows best. The number is not something we need to argue about.

What age is the People of the Cave story suitable for?

The People of the Cave story suits children from about age 4, because it is gentle and has a cave, a dog and a long sleep. Young children can hear the short version; ages 7 to 9 can add the waking up and the old coins; older children can read the whole passage, 18:9-26, with tafsir.

Sources

Quran: Surah al-Kahf 18:9-26 (Uthmani text and Saheeh International translation). Tafsir: Ibn Kathir (Tafsir al-Quran al-'Azim), al-Sa'di (Taysir al-Karim al-Rahman) and al-Tafsir al-Muyassar (King Fahd Complex).

Updated: · By QASAS

Free · No ads · No account

Watch and read it in QASAS

Free on iPhone and Android. Download QASAS from the App Store or Google Play.

QR code: QASAS on Google PlayScan with your Android phone to install

Watch these stories in the app

Keep reading