The Makkan Period, Part 2: The Ancestry of the Messenger of Allah, From Ibrāhīm to ʿAbdullāh
Section 4 of 14 · The Life of the Prophet Muhammad: The Makkan Period
Between Ṣafā and Marwah
And then Ibrāhīm (peace be upon him) left. Hājar (peace be upon her) made use of the small amount of food that he had left with them, but after a short while they ran out of food, and Hājar (peace be upon her) was breastfeeding Ismāʿīl, and her milk was drying up, because she was thirsty and hungry. Now Ismāʿīl (peace be upon him) began to cry, he was hungry. So Hājar (peace be upon her) couldn't bear seeing her son agonising in pain, so she left him and started climbing a hill, later called Ṣafā, to see if she could see anybody on the horizon. She would look left and right and see no one.
So she would climb down the hill, and when she reached the valley, she would tuck up her clothes and run. And then she would climb another hill, later called Marwah, and reach the top and look on the horizon to see if she could see anybody. And her son was twisting and turning in pain, and Hājar (peace be upon her) was running up and down these hills, and she did that seven times.
The seventh time, when she reached the top of the hill, she heard a sound, and she was looking around to see where the sound was coming from. And to her amazement, she saw that the sound was coming from beneath the feet of Ismāʿīl (peace be upon him). Jibrīl (peace be upon him) had descended and was digging the well of Zamzam, and the water was coming out from beneath his feet. Hājar (peace be upon her) rushed in happiness to the source of the water, and because it's a dry desert that would soak up all of the water, she was making a pool around it to contain it.
The Messenger of Allah (peace be upon him), when he was narrating the story, said: "May Allah have mercy on the mother of Ismāʿīl. If she had left the water alone, Zamzam would have been a flowing spring." Because of her interference, it became a well. She was trying to contain the water and didn't allow it to flow. If she had left the miracle as it was, without interfering, it would have been a flowing stream. So the Messenger of Allah (peace be upon him) smiled and said: "May Allah have mercy on her."