Sahih al-Bukhari 5974
Narrated Ibn `Umar:
Allah's Messenger (ﷺ) said, "While three persons were traveling, they were overtaken by rain and they took 
shelter in a cave in a mountain. A big rock fell from the mountain over the mouth of the cave and 
blocked it. They said to each other. 'Think of such good (righteous) deeds which, you did for Allah's 
sake only, and invoke Allah by giving reference to those deeds so that Allah may relieve you from 
your difficulty. one of them said, 'O Allah! I had my parents who were very old and I had small 
children for whose sake I used to work as a shepherd. When I returned to them at night and milked 
(the sheep), I used to start giving the milk to my parents first before giving to my children. And one 
day I went far away in search of a grazing place (for my sheep), and didn't return home till late at 
night and found that my parents had slept. I milked (my livestock) as usual and brought the milk 
vessel and stood at their heads, and I disliked to wake them up from their sleep, and I also disliked to 
give the milk to my children before my parents though my children were crying (from hunger) at my 
feet. 
So this state of mine and theirs continued till the day dawned. (O Allah!) If you considered that I had 
done that only for seeking Your pleasure, then please let there be an opening through which we can 
see the sky.' So Allah made for them an opening through which they could see the sky. Then the 
second person said, 'O Allah! I had a she-cousin whom I loved as much as a passionate man love a 
woman. I tried to seduce her but she refused till I paid her one-hundred Dinars So I worked hard till I 
collected one hundred Dinars and went to her with that But when I sat in between her legs (to have 
sexual intercourse with her), she said, 'O Allah's slave! Be afraid of Allah ! Do not deflower me 
except legally (by marriage contract). So I left her O Allah! If you considered that I had done that only 
for seeking Your pleasure then please let the rock move a little to have a (wider) opening.' 
So Allah shifted that rock to make the opening wider for them. And the last (third) person said 'O 
Allah ! I employed a laborer for wages equal to a Faraq (a certain measure: of rice, and when he had 
finished his job he demanded his wages, but when I presented his due to him, he gave it up and 
refused to take it. Then I kept on sowing that rice for him (several times) till managed to buy with the 
price of the yield, some cows and their shepherd Later on the laborer came to me an said. '(O Allah's 
slave!) Be afraid o Allah, and do not be unjust to me an give me my due.' I said (to him). 'Go and take 
those cows and their shepherd. So he took them and went away. (So, O Allah!) If You considered that 
I had done that for seeking Your pleasure, then please remove the remaining part of the rock.' And so 
Allah released them (from their difficulty).
حَدَّثَنَا سَعِيدُ بْنُ أَبِي مَرْيَمَ، حَدَّثَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ بْنِ عُقْبَةَ، قَالَ أَخْبَرَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ ‏
"‏ بَيْنَمَا ثَلاَثَةُ نَفَرٍ يَتَمَاشَوْنَ أَخَذَهُمُ الْمَطَرُ، فَمَالُوا إِلَى غَارٍ فِي الْجَبَلِ، فَانْحَطَّتْ عَلَى فَمِ غَارِهِمْ صَخْرَةٌ مِنَ الْجَبَلِ، فَأَطْبَقَتْ عَلَيْهِمْ، فَقَالَ بَعْضُهُمْ لِبَعْضٍ انْظُرُوا أَعْمَالاً عَمِلْتُمُوهَا لِلَّهِ صَالِحَةً، فَادْعُوا اللَّهَ بِهَا لَعَلَّهُ يَفْرُجُهَا‏.‏ فَقَالَ أَحَدُهُمُ اللَّهُمَّ إِنَّهُ كَانَ لِي وَالِدَانِ شَيْخَانِ كَبِيرَانِ، وَلِي صِبْيَةٌ صِغَارٌ كُنْتُ أَرْعَى عَلَيْهِمْ، فَإِذَا رُحْتُ عَلَيْهِمْ فَحَلَبْتُ بَدَأْتُ بِوَالِدَىَّ أَسْقِيهِمَا قَبْلَ وَلَدِي، وَإِنَّهُ نَاءَ بِيَ الشَّجَرُ فَمَا أَتَيْتُ حَتَّى أَمْسَيْتُ، فَوَجَدْتُهُمَا قَدْ نَامَا، فَحَلَبْتُ كَمَا كُنْتُ أَحْلُبُ، فَجِئْتُ بِالْحِلاَبِ فَقُمْتُ عِنْدَ رُءُوسِهِمَا، أَكْرَهُ أَنْ أُوقِظَهُمَا مِنْ نَوْمِهِمَا، وَأَكْرَهُ أَنْ أَبْدَأَ بِالصِّبْيَةِ قَبْلَهُمَا، وَالصِّبْيَةُ يَتَضَاغَوْنَ عِنْدَ قَدَمَىَّ، فَلَمْ يَزَلْ ذَلِكَ دَأْبِي وَدَأْبَهُمْ حَتَّى طَلَعَ الْفَجْرُ، فَإِنْ كُنْتَ تَعْلَمُ أَنِّي فَعَلْتُ ذَلِكَ ابْتِغَاءَ وَجْهِكَ، فَافْرُجْ لَنَا فُرْجَةً نَرَى مِنْهَا السَّمَاءَ، فَفَرَجَ اللَّهُ لَهُمْ فُرْجَةً حَتَّى يَرَوْنَ مِنْهَا السَّمَاءَ‏.‏ وَقَالَ الثَّانِي اللَّهُمَّ إِنَّهُ كَانَتْ لِي ابْنَةُ عَمٍّ، أُحِبُّهَا كَأَشَدِّ مَا يُحِبُّ الرِّجَالُ النِّسَاءَ، فَطَلَبْتُ إِلَيْهَا نَفْسَهَا، فَأَبَتْ حَتَّى آتِيَهَا بِمِائَةِ دِينَارٍ، فَسَعَيْتُ حَتَّى جَمَعْتُ مِائَةَ دِينَارٍ، فَلَقِيتُهَا بِهَا، فَلَمَّا قَعَدْتُ بَيْنَ رِجْلَيْهَا قَالَتْ يَا عَبْدَ اللَّهِ اتَّقِ اللَّهَ، وَلاَ تَفْتَحِ الْخَاتَمَ‏.‏ فَقُمْتُ عَنْهَا، اللَّهُمَّ فَإِنْ كُنْتَ تَعْلَمُ أَنِّي قَدْ فَعَلْتُ ذَلِكَ ابْتِغَاءَ وَجْهِكَ فَافْرُجْ لَنَا مِنْهَا فَفَرَجَ لَهُمْ فُرْجَةً‏.‏ وَقَالَ الآخَرُ اللَّهُمَّ إِنِّي كُنْتُ اسْتَأْجَرْتُ أَجِيرًا بِفَرَقِ أَرُزٍّ فَلَمَّا قَضَى عَمَلَهُ قَالَ أَعْطِنِي حَقِّي‏.‏ فَعَرَضْتُ عَلَيْهِ حَقَّهُ، فَتَرَكَهُ وَرَغِبَ عَنْهُ، فَلَمْ أَزَلْ أَزْرَعُهُ حَتَّى جَمَعْتُ مِنْهُ بَقَرًا وَرَاعِيَهَا، فَجَاءَنِي فَقَالَ اتَّقِ اللَّهَ وَلاَ تَظْلِمْنِي، وَأَعْطِنِي حَقِّي‏.‏ فَقُلْتُ اذْهَبْ إِلَى ذَلِكَ الْبَقَرِ وَرَاعِيهَا‏.‏ فَقَالَ اتَّقِ اللَّهَ وَلاَ تَهْزَأْ بِي‏.‏ فَقُلْتُ إِنِّي لاَ أَهْزَأُ بِكَ، فَخُذْ ذَلِكَ الْبَقَرَ وَرَاعِيَهَا‏.‏ فَأَخَذَهُ فَانْطَلَقَ بِهَا، فَإِنْ كُنْتَ تَعْلَمُ أَنِّي فَعَلْتُ ذَلِكَ ابْتِغَاءَ وَجْهِكَ، فَافْرُجْ مَا بَقِيَ، فَفَرَجَ اللَّهُ عَنْهُمْ ‏"‏‏.‏