Connect with us

Quran and Sunnah

The Mercy of Allah in Action: Companions of the Cave



The story of Ashaabul Kahf, the companions of cave from surah Kahf (18), is full of lessons and virtues that we can reflect and act upon.

One such lesson is how Allah ta’ala spreads His Mercy for those who sacrifice for Him.

Keep supporting MuslimMatters for the sake of Allah

Alhamdulillah, we're at over 850 supporters. Help us get to 900 supporters this month. All it takes is a small gift from a reader like you to keep us going, for just $2 / month.

The Prophet (SAW) has taught us the best of deeds are those that done consistently, even if they are small. Click here to support MuslimMatters with a monthly donation of $2 per month. Set it and collect blessings from Allah (swt) for the khayr you're supporting without thinking about it.

In ayah 16, the youth say to one another:

وَإِذِ اعْتَزَلْتُمُوهُمْ وَمَا يَعْبُدُونَ إِلَّا اللَّهَ فَأْوُوا إِلَى الْكَهْفِ يَنشُرْ لَكُمْ رَبُّكُم مِّن رَّحْمَتِهِ وَيُهَيِّئْ لَكُم مِّنْ أَمْرِكُم مِّرْفَقًا

“And when you withdraw from them, and that which they worship, except Allah, then seek refuge in the Cave, your Lord will open a way for you from His Mercy and will make easy for you your affair.” (18:16)

They end by saying, وَيُهَيِّئْ لَكُم مِّنْ أَمْرِكُم مِّرْفَقًا – and He will facilitate for you your affair. Mirfaqa is from ra-fa-qaaf, rifq. Mirfaqa, which literally means a tool, has several meanings:

  1. He will give you ease and convenience through means (ex: food, security in the cave).
  2. He will create facility, ease and convenience for you regarding your matter.
  3. He will create for you means which will be easy. There will be no hardship, Allah will make everything easy.

In the next two ayaat, we learn how Allah ta’ala spread His mercy for them:

وَتَرَى الشَّمْسَ إِذَا طَلَعَت تَّزَاوَرُ عَن كَهْفِهِمْ ذَاتَ الْيَمِينِ وَإِذَا غَرَبَت تَّقْرِضُهُمْ ذَاتَ الشِّمَالِ وَهُمْ فِي فَجْوَةٍ مِّنْهُ ۚ ذَ‌ٰلِكَ مِنْ آيَاتِ اللَّهِ ۗ مَن يَهْدِ اللَّهُ فَهُوَ الْمُهْتَدِ ۖ وَمَن يُضْلِلْ فَلَن تَجِدَ لَهُ وَلِيًّا مُّرْشِدًا

And you would have seen the sun, when it rose, declining to the right from their Cave, and when it set, turning away from them to the left, while they lay in the midst of the Cave. That is of the signs of Allah. He whom Allah guides, is rightly guided; but he whom He sends astray, for him you will find no guiding friend to lead him. (18: 17)

When Ashaabul Kahf went to sleep, the direct light of the sun, nor its heat reached them. When the sun rose, it would rise from the front of them, in such a direction that the sun was rising from their right side. Then when the sun would set, it was not directly on them when they were sleeping but on their left side. So the mouth of the cave was located towards the north or the south, because the sun was on their right side when rising and on their left side when setting. Another meaning of this is that the sun inclined away from the right when it rose so no heat or light reached them, but when it set, some of the light and heat reached them just enough for their sustenance, just enough for them to live and so they would not wake up from the heat or light of the sun.

وَهُمْ فِي فَجْوَةٍ مِّنْهُThey were in an open space therein. Fajwah means a vast and open space, a gap. They were not in the entrance of the cave, but in the vast openness of the cave, showing that it was not a small cave but a large one that was not constricting, but comfortable and spacious enough to lie down. Allah took care of all of their needs, even their sleeping arrangements.

Allah ta’ala says,

ذَ‌ٰلِكَ مِنْ آيَاتِ اللَّهِ ‘That is from the ayaat of Allah!”

Their leaving of the people and going to the cave, the location of the cave, the sun inclining away, the sun not reaching them, the heat not burning them, the open space of the cave, all of this are miraculous signs of Allah’s Qudrah: His Power and Might. This story was not a mere coincidence, they did not just fall upon the cave, randomly found it to be an open space, the sun just happened to not fall upon them when they were sleeping, rather Allah ta’ala made it all happen for them. This is how Allah helps those who stand up for His cause. This is the mercy of Allah in action.

وَتَحْسَبُهُمْ أَيْقَاظًا وَهُمْ رُقُودٌ ۚ وَنُقَلِّبُهُمْ ذَاتَ الْيَمِينِ وَذَاتَ الشِّمَالِ ۖ وَكَلْبُهُم بَاسِطٌ ذِرَاعَيْهِ بِالْوَصِيدِ ۚ لَوِ اطَّلَعْتَ عَلَيْهِمْ لَوَلَّيْتَ مِنْهُمْ فِرَارًا وَلَمُلِئْتَ مِنْهُمْ رُعْبًا

And you would have thought them awake, while they were asleep. And We turned them on their right and on their left sides, and their dog stretching forth his two forelegs at the entrance. Had you looked at them, you would certainly have turned back from them in flight, and would certainly have been filled with awe of them. (18:18)

وَتَحْسَبُهُمْ أَيْقَاظًا وَهُمْ رُقُودٌ- “And you would have thought them awake, while they were asleep. ” If you were there and you looked at them sleeping in the cave, you would assume them to be awake but rather they were sleeping. Some scholars say they were sleeping with their eyes open, and other say they were reclining in a way that they looked awake.

وَنُقَلِّبُهُمْ ذَاتَ الْيَمِينِ وَذَاتَ الشِّمَالِ- “And We turned them on their right and on their left sides.” They were not lying on their stomachs or backs, because the correct way to sleep is on the right, and they were changing sides, over and over. It is a mercy of Allah to us that we are able to change sides, because if we stay in the same position, our skin would become hard and deteriorate because of the pressure. Even nowadays, nurses are taught to constantly move immobile patients because they can easily develop a bed sore. To add, these youth were sleeping on the ground, and the natural property of sand and soil is that it eats skin so if they were not changing their sides their skins would have deteriorated.

وَكَلْبُهُم بَاسِطٌ ذِرَاعَيْهِ بِالْوَصِيدِ- “And their dog stretching forth his two forelegs at the entrance.” Allah ta’ala also protected them with a guard dog at the front entrance of the cave.

لَوِ اطَّلَعْتَ عَلَيْهِمْ لَوَلَّيْتَ مِنْهُمْ فِرَارًا وَلَمُلِئْتَ مِنْهُمْ رُعْبًا“Had you looked at them, you would certainly have turned back from them in flight, and would certainly have been filled with awe of them.” اطَّلَعْتَittala’at, means to look down at something while a person is facing it. This shows that the cave was at an angle, so that if one wanted to look in the cave, they would have to ascend. Allah made the cave so that no person would be able to remain there, such as a passerby, because the atmosphere was made that the person would feel fright and feel terror so they would not be able to stay, but rather run in terror.

From these two ayaat, we learn how Allah spread His Mercy for them:

  1. He put them to sleep in cave.
  2. He gave them the ability to change their sides while sleeping
  3. The sun’s direct light and heat did not reach them, or just enough for their sustenance.
  4. The environment was made such that if anyone passed by, they had fear in their hearts and they were not able to stay there.
  5. They had a guard dog at the entrance of the cave

Why did Allah bestow His Mercy upon them? These youth had emaan, they acted on their emaan and they completely relied upon Allah.

The lesson? If you put your emaan first, act on it and completely rely on Allah, Allah will make things happen for you.

If you are sincere to Allah, if you sacrifice for Allah, He ta’ala will facilitate your way, make arrangements for you, and spread His Mercy for you through ways you can never imagine.

and Allah knows best.

Read more tafseer lessons such as this one from suratul Kahf here.

Keep supporting MuslimMatters for the sake of Allah

Alhamdulillah, we're at over 850 supporters. Help us get to 900 supporters this month. All it takes is a small gift from a reader like you to keep us going, for just $2 / month.

The Prophet (SAW) has taught us the best of deeds are those that done consistently, even if they are small. Click here to support MuslimMatters with a monthly donation of $2 per month. Set it and collect blessings from Allah (swt) for the khayr you're supporting without thinking about it.

Amatullah is a student of the Qur'an and its language. She completed the 2007 Ta'leem program at Al-Huda Institute in Canada and studied Qur'an, Tajwid (science of recitation) and Arabic in Cairo. Through her writings, she hopes to share the practical guidance taught to us by Allah and His Messenger and how to make spirituality an active part of our lives. She has a Bachelors in Social Work and will be completing the Masters program in 2014 inshaAllah. Her experience includes working with immigrant seniors, refugee settlement and accessibility for people with disabilities.



  1. Sakina Al-Amin

    May 30, 2009 at 1:02 AM

    MashAllah, great post. Suratul Kahf is one of my favorites. I love stories and the examples in it.

  2. Ikram Hadi

    May 30, 2009 at 1:06 AM

    In Iraq we used to watch a TV series of the Companions of the Cave during Ramadan. Those were some of the best times of my life…

  3. Zainab (AnonyMouse)

    May 30, 2009 at 1:17 AM

    Masha’Allah, excellent… and even better because for those of us who try to make a habit of reading Surah al-Kahf every Friday, this lets us get a deeper glimpse into a story that we recite so often and (unfortunately) without too much thought.

  4. Shahid

    May 30, 2009 at 2:58 AM

    Salaam Alaikum

    MashaAllah JazakAllah khair

    The details were excellent inshAllah post more of the Surah Kahf

  5. Saud

    May 30, 2009 at 8:17 AM

    MashaAllaah. May Allaah reward you, and increase you in understanding, righteous action and eloquence.

  6. midatlantic

    May 30, 2009 at 9:03 AM

    Amazing, amazing stuff. May Allah reward you for all the Quranic gems you share with us. There is nothing more awe-inspiring than the words of Allah. May Allah open our hearts to it’s understanding and reflection.

  7. Umm Fulaanah

    May 30, 2009 at 9:55 AM

    Uhhhh Wiiiiiiii!

    I’ve always been a fan of this story…. Was my bedtime story for a VERY VERY long time…
    Jazaakallaahu khayran for this great post..=)

  8. ayesha

    May 30, 2009 at 11:29 AM

    barakallahukfeeki…..yet another beautiful article….i reali enjoy reading ur posts…….particularly coz they are in relation with the ayaat of the quraan…..jus amazing!!

  9. Syed Jamaluddin

    May 30, 2009 at 12:35 PM

    I personally am curious about the article’s subject. Can we write it like this? “….in Action”. What do we mean by that? I am curious.. His Mercy is always there and prevails.. What do we mean by …in Action’???

    And Allah Knows Best.

  10. Amatullah

    May 30, 2009 at 12:45 PM

    Jazaakum Allahu for the comments everyone. Ameen to all the duaas, and may Allah ta’ala grant you more.

    I am always amazed at the story of Ashaabul Kahf, subhanAllah, how they left everything behind for Allah’s Sake Alone and Allah preserved their story for us. There are so many amazing lessons we as youth can learn from them.

    I also love the fact that they knew Allah would spread His Mercy for them! SubhanAllah talk about tawakkul.

    Syed Jamaluddin: By ‘in action’ it means the manifestation of Allah’s ta’ala Rahmah upon the youth. Of course His Mercy is always present, but the point was to show that what happened to the youth in the cave was not a mere coincidence but a direct result of their duaa and trust in Allah ta’ala that He will grant Rahmah for them and protect them. I hope that is clear. Allahu ta’ala a’lam.

  11. Sadaf

    May 31, 2009 at 1:29 AM

    Excellent post! Jazakillahu khairan.

    By this story, I am reminded of the hadith in Sahih Al-Bukhari that narrates how three men got trapped in a cave, and each sought to move the boulder blocking it’s entrance with a special waseelah towards Allah’s mercy – e.g. a good deed they had done just for Him, or a bad deed they had not done, similarly, just for Him. The boulder moved after the third one’s plea, and they all escaped.

    The points of these stories are how Allah’s miracles happen for people who have a high level of faith and tawakkul, and who make sacrifices for the sake of Allah’s Pleasure. Indeed these stories in the Quran (and sunnah) are eternal lessons for those who reflect upon Allah’s signs, and who believe in His omnipotent power.

  12. crespoh69

    May 31, 2009 at 1:51 AM

    Asalaam Aleykum, can anyone tell me why dogs are allowed here but usually its said by most believers that their haram?

    • Amatullah

      May 31, 2009 at 12:15 PM

      wa alaykum salam wa rahmatullah,

      It is a huge misconception amongst Muslims that dogs are haraam. The animal is not haraam, rather its saliva is najas (impure) and requires the person to clean themselves if they come in contact with it.

      The scholars mention that this dog shows what righteous company can do for you..A simple dog has been preserved in the Qur’an because it was with righteous individuals.

      Allah knows best.

      • crespoh69

        May 31, 2009 at 1:18 PM

        But why is it that we are unable to pray when they are in the same room as us? Jazakala kahir for your help!

        • Amatullah

          May 31, 2009 at 2:18 PM

          wa iyyak, I checked IslamQA for your question:

          1- only if a dog walks in front of your salah is it nullified:

          2- Position of dogs in Islam:

          Allah knows best!

          • crespoh69

            May 31, 2009 at 3:21 PM

            That second link confused me sister (Amatulah is female right?) because in the first paragraph it says that dogs are allowed if for a purpose including guarding property and then goes on to say:

            “As far as keeping a dog to guard the house is concerned, Ibn Qudaamah said: “It is not permitted, according to the most sound opinion.” (al-Mawsoo’ah al-Fiqhiyyah, 35/124)”

            Isn’t a persons house regarded as property in Islam? I don’t mean to be a pest lol just wanted to clarify because my family (Catholic) has dogs in the house and it worries me at times when making salaat.

            Isn’t there also a hadith that says that the Prophet (PBUH) was awaiting a visit from angel Gabriel (PBUH) one night and he didn’t show up for 2 nights so the Prophet (PBUH) looked around and found a puppy under his bed(?) so he removed the dog and ordered the spot to be washed and the next night Gabriel (PBUH) entered his home?

          • Amatullah

            June 4, 2009 at 12:55 PM

            Apologies for not responding earlier. Yes I am a sister. I really do not know the answer to your question brother/sister, do you have any contacts with an imam or someone of knowledge in your locality? InshaAllah the best thing to do is to ask them personally. May Allah guide you and assist you. Ameen.

  13. Rabiah

    May 31, 2009 at 6:16 AM


    Jazakumallahu khairaa .Mashaallah.

  14. UmmeAmmaarah

    June 2, 2009 at 12:15 PM

    Assalamu-alaikum sister. JazakAllahu khair for a very wonderful article. It really is one of my favorite stories from one of my very favorite surats. It’s kind of a digression, but would you happen to know if it’s true that that dog would also be permitted to enter paradise with these men, as it accompanied them everywhere, and guarded them? I had read so from an Islamic story book for children. ( among others which had stories of how the pig and the cat were born for the first time on Nuh AS’s ark)

    • Amatullah

      June 4, 2009 at 1:01 PM

      wa alaykum salam wa rahmatullah ukhti, wa iyyaki.

      I do not know about the dog entering Paradise, Allah knows best.

      I do know however that in the hereafter, animals will not enter Jannah/Naar because they do not have free will, so they will not be held accountable for their actions or rewarded for their actions. The only narration is that a ram with horns who hurt another ram without horns will be given the opportunity to do the same to the ram that hurt it in the dunya. It is said that after any retribution is taken, Allah ta’ala will turn all of the animals to dust. (Check out the tafseer of the last ayah in surah Naba for the source)

      Allah knows best.

  15. Jonny

    May 28, 2018 at 3:37 AM

    salaam brother Amatullah. Can you please supply the sources where all the info is derived from .
    From which tafsir books

    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *