Ibn ‘Abbas said: ‘Prophet Ibrahim (peace be upon him) brought Hajar, his wife, and her son Isma’il (peace be upon them), whom she was still nursing, and left them at (the site of) the House of Allah under a tree above the Zamzam. Makkah at that time was a place where there was neither water nor any dweller. He left a bag of dates and a container of water for them. Then Ibrahim (peace be upon him) turned to go away. Isma’il’s mother said to him, “O Ibrahim! Where are you going? And who are you leaving us to in this valley without a companion or a thing?” She repeated this several times but he did not respond. At last, she asked him, “Has Allah commanded you to do so?” He answered, “Yes.” Thereupon she said, “Then He will not let us perish!” (Bukhari) In another narration, we
read: “She asked him, ‘Who are you leaving us to?’ He answered, ‘To Allah’ where she responded, ‘I am satisfied,’ and turned back.”

Ibrahim left and when he reached a mountain pass where he could no longer see them, he turned his face toward the Kaaba and with his hands raised, supplicated, “O Our Lord! I have made of my offspring to dwell in a valley without cultivation by your Sacred House; Our Lord, that they may establish regular prayer: so fill the hearts of some among men with love towards them, and feed them with fruits, so that they may give thanks!” (Qur’an 14.37)

Hajar sat under the tree with her baby next to her. She drank from her water container hanging nearby, and nursed her baby, until all the water she had was gone, and her milk dried out. Her son grew hungrier and hungrier. She could hardly bear to look at him. She went and stood at Safa – the hill nearest to her. She looked down the valley to see if someone was around to help. She could see no one. So, she climbed down Safa and reached the valley. She struggled hard, crossed the valley, and reached Marwah. She stood on Marwah and looked around. Still, she could see no one around. She repeated this seven times. Ibn ‘Abbas added, “The Prophet (peace be upon him) said: ‘It is (to commemorate this walk) that pilgrims walk between Safa and Marwah.”‘

Fiqh 5.85