Allah's Messenger (ﷺ) said, "Once three persons (from the previous nations) were traveling, and suddenly it started raining and they took shelter in a cave. The entrance of the cave got closed while they were inside. They said to each other, 'O you! Nothing can save you except the truth, so each of you should ask Allah's Help by referring to such a deed as he thinks he did sincerely (i.e. just for gaining Allah's Pleasure).' So one of them said, 'O Allah! You know that I had a laborer who worked for me for one Faraq (i.e. three Sas) of rice, but he departed, leaving it (i.e. his wages). I sowed that Faraq of rice and with its yield I bought cows (for him). Later on when he came to me asking for his wages, I said (to him), 'Go to those cows and drive them away.' He said to me, 'But you have to pay me only a Faraq of rice,' I said to him, 'Go to those cows and take them, for they are the product of that Faraq (of rice).' So he drove them. O Allah! If you consider that I did that for fear of You, then please remove the rock.' The rock shifted a bit from the mouth of the cave. The second one said, 'O Allah, You know that I had old parents whom I used to provide with the milk of my sheep every night. One night I was delayed and when I came, they had slept, while my wife and children were crying with hunger. I used not to let them (i.e. my family) drink unless my parents had drunk first. So I disliked to wake them up and also disliked that they should sleep without drinking it, I kept on waiting (for them to wake) till it dawned. O Allah! If You consider that I did that for fear of you, then please remove the rock.' So the rock shifted and they could see the sky through it. The (third) one said, 'O Allah! You know that I had a cousin (i.e. my paternal uncle's daughter) who was most beloved to me and I sought to seduce her, but she refused, unless I paid her one-hundred Dinars (i.e. gold pieces). So I collected the amount and brought it to her, and she allowed me to sleep with her. But when I sat between her legs, she said, 'Be afraid of Allah, and do not deflower me but legally. 'I got up and left the hundred Dinars (for her). O Allah! If You consider that I did that for fear of you than please remove the rock. So Allah saved them and they came out (of the cave)."
Hadith of the Three Men in the Cave
Sahih al-Bukhari 3465 - Book of Prophets
Context and Significance
This profound narration illustrates how sincere deeds performed purely for Allah's pleasure can serve as means of salvation even in seemingly hopeless situations. The three individuals, trapped by a massive rock, recognize that only truthfulness before Allah can deliver them.
Scholarly Commentary: First Man's Deed
The first man demonstrated exceptional honesty in business dealings. Scholars note he went beyond mere obligation by giving the laborer not just the original wages but the multiplied profit. This exemplifies the Islamic principle of amānah (trustworthiness) in financial matters. His fear was not of worldly accountability but of divine reckoning.
Scholarly Commentary: Second Man's Deed
The second man's story emphasizes birr al-wālidayn (kindness to parents). Classical commentators highlight how he prioritized his parents' comfort over his own family's hunger, maintaining this devotion throughout the night. This illustrates the supreme status parents hold in Islam and the reward for patient obedience to them.
Scholarly Commentary: Third Man's Deed
The third man's account demonstrates powerful tawbah (repentance). Scholars explain that despite being at the moment of sin, he abandoned his desire when reminded of Allah's fear. His leaving the money shows complete severance from the sinful intention. This teaches that sincere repentance can efface major sins.
Legal and Spiritual Lessons
Jurists derive from this hadith that invoking Allah through righteous deeds is permissible. The rock's gradual movement indicates varying levels of deed acceptance. The narration ultimately teaches that ikhlāṣ (sincerity) transforms ordinary actions into means of divine intervention and salvation.