Among the proofs for this kind of tawassul is the story of the three men in the cave, as related by ʿAbd Allah ibn ʿUmar—may Allah be pleased with them both—who said: I heard the Messenger of Allah ﷺ say:
“Three men from those who lived before you set out until night overtook them and they sought lodging in a cave. They entered it, and a boulder rolled down from the mountain and blocked the entrance. They said, ‘Nothing will rescue you from this rock except that you supplicate to Allah by virtue of your righteous deeds.’ ” In another version recorded by Muslim: “Some of them said to the others, ‘Look for deeds you performed sincerely for Allah; then call upon Him by them—perhaps Allah will relieve you of this.’ ”
One of them said, “O Allah, I had two elderly parents, and I never poured the evening drink1 for my family or my servants before them. One day I went out seeking something”—Muslim’s wording is: “seeking firewood”—“and I did not return to them until they had fallen asleep. I milked the animals for their evening drink but found them sleeping, and I disliked serving the drink to my family or my servants before them. So I remained standing with the vessel in my hand, waiting for them to wake up, until dawn broke. They awoke and drank their milk. O Allah, if I did that seeking only Your Face, then lift from us the distress we are in because of this rock.” The rock moved a little, yet they were still unable to get out.
The Prophet ﷺ continued: “Then the second man said, ‘O Allah, I had a female cousin who was dearer to me than anyone else. I sought to have my way with her but she refused me, until a year2 of hardship befell her. She came to me and I gave her one hundred and twenty dinars on condition that she allow me access to herself, and she consented. When I had power over her she said, ‘No…’ ”
1 Evening drink of milk customarily offered at night.
2 A severe year (of famine or need).