Ibn ‘Umar (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) said: "While three persons were walking, rain began to fall and they had to enter a cave in a mountain. A (big) rock rolled over (and blocked the mouth of the cave). They said to one another: 'Invoke Allah with the best deed you have performed.' One of them said: 'O Allah, my parents were old, and I used to go out for grazing (my camels), and on my return, I would milk (the camels) and take the milk to my parents to drink. After that, I would give it to my children, family, and wife. One day, I got delayed, and as I returned home, I found my parents asleep, and I disliked to awaken them. The children were crying near my feet (out of hunger), and they continued like that till dawn. O Allah, if You know that I did this for Your sake, remove this rock a bit so that we may see the sky.' So the rock was moved a bit. The second man said: 'O Allah, You know that I loved a cousin of mine with the deepest love that a man might have for a woman, and she told me that I would not get my desire fulfilled unless I paid her one hundred dinars. I struggled until I could gather the required amount, and when I sat in between her legs, she said: 'Fear Allah, and do not deflower me except lawfully.' Thereupon, I got up and left her. O Allah, If You know that I did this for Your sake, remove this rock a bit.' So two thirds of the rock was moved. Then the third man said: 'O Allah, You know that I once hired a worker for one Faraq (a measure equal to 16 pounds) of maize, and when I wanted to pay him, he refused to take his wages; so I cultivated it and bought cows and a shepherd from its yield; and after a period of time, that man came and said: 'O slave of Allah, give me my right.' I said to him: ‘Go to those cows and the shepherd and take them, for they yours.’ He said: ‘Are you mocking me?’ I said to him: ‘I am not mocking you; but they belong to you.’ O Allah, If You know that I did this for Your sake, remove the rock.' So the rock was removed."
Authentic hadith -
Narrated by Bukhari & Muslim