Anas bin Malik reported,

The Prophet ﷺ reported that three men from among the people of long ago set out seeking provision for their families. The rain caught them, so they entered a cave, and a great rock fell and sealed its mouth so that they could see no opening at all.They said to one another, "The rock has fallen, all traces are gone, and no one knows your location except Allah. So call upon Allah by the most reliable of your deeds."One of them said, "O Allah, You know that I had two parents, and I used to milk for them into their vessel and bring it to them. If I found them sleeping, I would stand at their heads, unwilling to disturb their slumber, until they awoke whenever they awoke. O Allah, if You know that I did this hoping for Your mercy and fearing Your punishment, then relieve us."A third of the rock moved away.The second said, "O Allah, You know that I once hired a laborer to do some work for me. He came seeking his wages while I was angry, and I rebuked him. He left, abandoning his wages. I gathered them and invested them until they grew into a great deal of wealth. Then he came seeking his wages, and I handed all of it over to him, though had I wished, I could have given him only his original wage. O Allah, if You know that I did this hoping for Your mercy and fearing Your punishment, then relieve us."Two-thirds of the rock moved away.The third said, "O Allah, You know that a woman pleased a man, and he offered her a sum of money. When he gained power over her, she pleaded with him for the sake of her honor, and he left her alone and let her keep the payment. O Allah, if You know that I did this hoping for Your mercy and fearing Your punishment, then relieve us."The rock then moved away entirely, and they emerged walking briskly together.

Ahmad 12454

Sahih

حدثنا يحيى بن حماد حدثنا أبو عوانة عن قتادة

عن أنس

عن النبي ﷺ أن ثلاثة نفر فيما سلف من الناس انطلقوا يرتادون لأهلهم فأخذتهم السماء فدخلوا غارا فسقط عليهم حجر متجاف حتى ما يرون منه حصاصة فقال بعضهم لبعض قد وقع الحجر وعفا الأثر ولا يعلم بمكانكم إلا الله فادعوا الله بأوثق أعمالكم قال فقال رجل منهم اللهم إن كنت تعلم أنه قد كان لي والدان فكنت أحلب لهما في إنائهما فآتيهما فإذا وجدتهما راقدين قمت على رءوسهما كراهية أن أرد سنتهما في رءوسهما حتى يستيقظا متى استيقظا اللهم إن كنت تعلم أني إنما فعلت ذلك رجاء رحمتك ومخافة عذابك ففرج عنا فزال ثلث الحجر وقال الآخر اللهم إن كنت تعلم أني استأجرت أجيرا على عمل يعمله فأتاني يطلب أجره وأنا غضبان فزبرته فانطلق فترك أجره ذلك فجمعته وثمرته حتى كان منه كل المال فأتاني يطلب أجره فدفعت إليه ذلك كله ولو شئت لم أعطه إلا أجره الأول اللهم إن كنت تعلم أني إنما فعلت ذلك رجاء رحمتك ومخافة عذابك ففرج عنا قال فزال ثلثا الحجر وقال الثالث اللهم إن كنت تعلم أنه أعجبته امرأة فجعل لها جعلا فلما قدر عليها وقر لها نفسها وسلم لها جعلها اللهم إن كنت تعلم أني إنما فعلت ذلك رجاء رحمتك ومخافة عذابك ففرج عنا فزال الحجر وخرجوا معانيق يتماشون

أحمد 12454صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 12454
Ahmad 12454