Ibn Abbas narrated a slightly different version: "When Abraham had differences with his wife (because of her jealousy of Hajar, Ishmael's mother), he took Ishmael and his mother and went away. They had a water-skin with them containing some water. Ishmael's mother used to drink water from the water-skin so that her milk would increase for her child. When Abraham reached Mecca, he made her sit under a tree and afterwards returned home.
Ishmael's mother followed him, and when they reached Kada', she called him from behind: '0 Abraham! To whom are you leaving us?' He replied: '(I am leaving you) to Allah's (care).' She said: 'I am satisfied to be with Allah.' She returned to her place and started drinking water from the water-skin, and her milk increased for her child.
"When the water had all been used up, she said to herself: 'I had better go and look so that I may see somebody.' She ascended As-Safa Mountain and looked, hoping to see somebody, but in vain. When she came down to the valley, she ran till she reached Al-Marwa Mountain. She ran to and fro (between the two mountains) many times. Then she said to herself: 'I had better go and see the state of the child.' She went and found it in a state of one on the point of dying. She could not endure to watch it dying and said (to herself): 'If I go and look, I may find somebody.' She went and ascended Al-Safa mountain and looked for a long while but could not find anybody. Thus she completed seven rounds (of running) between As-Safa and Al-Marwa. Again she said (to herself):
'I had better go back and see the state of the child.' But suddenly she heard a voice, and she said to that strange voice: 'Help us if you can offer any help.' Lo! It was Gabriel (who had made the voice). Gabriel hit the earth with his heel like this (Ibn 'Abbas hit the earth with his heel to illustrate it), and so the water gushed out. Ishmael's mother was astonished and started digging."
Abu Al-Qasim, i.e. the Prophet, said: "If she had left the water, (flow naturally without her intervention), it would have been flowing on the surface of the earth."