I heard Allah's Messenger (ﷺ) saying, "Three men from among those who were before you, set out together till they reached a cave at night and entered it. A big rock rolled down the mountain and closed the mouth of the cave. They said (to each other), Nothing could save you from this rock but to invoke Allah by giving reference to the righteous deed which you have done (for Allah's sake only).' So, one of them said, 'O Allah! I had old parents and I never provided my family (wife, children etc.) with milk before them. One day, by chance I was delayed, and I came late (at night) while they had slept. I milked the sheep for them and took the milk to them, but I found them sleeping. I disliked to provide my family with the milk before them. I waited for them and the bowl of milk was in my hand and I kept on waiting for them to get up till the day dawned. Then they got up and drank the milk. O Allah! If I did that for Your Sake only, please relieve us from our critical situation caused by this rock.' So, the rock shifted a little but they could not get out." The Prophet (ﷺ) added, "The second man said, 'O Allah! I had a cousin who was the dearest of all people to me and I wanted to have sexual relations with her but she refused. Later she had a hard time in a famine year and she came to me and I gave her one-hundred-and-twenty Dinars on the condition that she would not resist my desire, and she agreed. When I was about to fulfill my desire, she said: It is illegal for you to outrage my chastity except by legitimate marriage. So, I thought it a sin to have sexual intercourse with her and left her though she was the dearest of all the people to me, and also I left the gold I had given her. O Allah! If I did that for Your Sake only, please relieve us from the present calamity.' So, the rock shifted a little more but still they could not get out from there." The Prophet (ﷺ) added, "Then the third man said, 'O Allah! I employed few laborers and I paid them their wages with the exception of one man who did not take his wages and went away. I invested his wages and I got much property thereby. (Then after some time) he came and said to me: O Allah's slave! Pay me my wages. I said to him: All the camels, cows, sheep and slaves you see, are yours. He said: O Allah's slave! Don't mock at me. I said: I am not mocking at you. So, he took all the herd and drove them away and left nothing. O Allah! If I did that for Your Sake only, please relieve us from the present suffering.' So, that rock shifted completely and they got out walking.
Commentary on the Hadith of the Three Men in the Cave
This profound narration from Sahih al-Bukhari (2272) illustrates the power of sincere deeds performed purely for Allah's pleasure. The three men, trapped by divine decree, were saved not by the magnitude of their deeds but by the purity of their intentions (ikhlas). Each story demonstrates a different aspect of righteous conduct that pleases Allah.
First Man: Filial Piety
The first man's story emphasizes the supreme status of parents in Islam. His refusal to drink milk before his parents, despite extreme thirst and fatigue, demonstrates the highest form of birr al-walidayn (kindness to parents). Scholars note that serving parents takes precedence even over optional night prayers, as this man prioritized their comfort over his own rest.
His patience through the night, holding the bowl until dawn, shows that true righteousness lies in consistent obedience, not merely occasional acts. The rock's partial movement indicates that while his deed was accepted, complete deliverance required collective righteousness.
Second Man: Chastity and Fear of Allah
This account highlights the Islamic concept of 'iffah (chastity) and taqwa (God-consciousness). Though the man initially intended sin, his sudden awakening to Allah's boundaries when the woman reminded him of marriage demonstrates how true faith prevents believers from transgressing limits.
Classical commentators emphasize that abandoning sin for Allah's sake, especially when desire is strong and opportunity exists, carries immense reward. His leaving the money despite having "paid" for the sin shows complete repentance. The rock's further movement signifies increasing divine acceptance.
Third Man: Honesty in Business
The final story exemplifies perfect trustworthiness (amanah) in financial matters. Islamic jurisprudence strictly protects workers' rights, and this man's extreme honesty—giving all profits generated from the laborer's withheld wages—exceeds basic requirements.
Scholars explain that his action represents the highest standard of Islamic business ethics, where one fears accounting before Allah more than worldly loss. The complete removal of the rock signifies that comprehensive honesty in transactions holds special weight with Allah, often leading to full divine assistance.
Collective Lessons
This hadith teaches that salvation comes through sincere deeds spanning various life aspects: family relations, personal chastity, and business conduct. The sequential deliverance shows that collective righteousness compounds divine mercy.
Ultimately, the narration emphasizes that Allah responds to those who prioritize His pleasure over worldly gains, and that true faith manifests in actions performed purely for His sake, without ostentation or expectation of worldly reward.