Prophet Ibrahim was given his first son, Ismail, by his wife Hajar. By Allah's command, Ibrahim took Hajar and baby Ismail to a barren valley that would become Makkah. No water, no plants. Ibrahim left them with a little water and dates, then returned to Sham — by Allah's command.
Hajar asked: "Where will you leave us?" Ibrahim was silent. Hajar asked again: "Did Allah command this?" Ibrahim nodded. Hajar said: "Then Allah won't abandon us."
When the water and dates ran out, baby Ismail cried from thirst. Hajar ran between the hills Safa and Marwah, searching for water — seven times. Until finally Allah brought forth water from beneath baby Ismail's feet. That is the well of Zamzam, still flowing today, 4000 years later.
Years passed. When Ismail was a young teen, Prophet Ibrahim came and said: "My son, I saw in a dream that I am sacrificing you. What do you think?" Ismail replied: "O my father, do as you are commanded. Allah willing, you will find me among the patient."
As the knife was about to touch Ismail's neck, Allah replaced him with a ram from Paradise. With his father, Ismail then built the Ka'bah in Makkah.