Four thousand years ago, the valley of Mecca was a dry and uninhabited place. According to Islamic history, the Prophet Ibrahim (Abraham) was instructed to bring Hajar and their child Ismael to Arabia from the land of Canaan by God‘s command.
As Ibrahim made ready to return to the land of Canaan, Hajar asked him, “Who ordered you to leave us here”? When Ibrahim replied: “Allah”(God), Hajar said, “then Allah will not forget us; you can go”. Although Ibrahim had left a large quantity of food and water with Hajar and Ismael, the supplies quickly ran out and within a few days the two were suffering from hunger and dehydration.
According to the story, a desperate Hajar ran up and down between two hills called Safa and Marwa seven times, trying to find water. Finally, she collapsed beside her baby Ismael and prayed to Allah for deliverance. Ismael struck his foot on the ground, causing a spring of water to gush forth from the earth. Other accounts have the angel Jibral (Gabriel) striking the earth and causing the spring to flow. With this secure water supply, they were not only able to provide for their own needs, but were also able to trade water with passing nomads for food and supplies. When the Prophet Ibrahim returned from Canaan to check on his family, he was amazed to see them running a profitable well.
The Prophet Ibrahim was told by God to build a shrine dedicated to him adjacent to Hajar’s well (the Zamzam Well). Ibrahim and Ismael constructed a small stone structure–-the Kaaba–which was to be the gathering place for all who wished to strengthen their faith in Allah. As the years passed, Ismael was blessed with Prophethood and gave the nomads of the desert his message of surrender to Allah. After many centuries, Mecca became a thriving city and a major center for trade, thanks to its reliable water source, the well of Zamzam.
One of the main trials of Prophet Ibrahim’s life was to face the command of Allah to devote his dearest possession, his only son. Upon hearing this command, he prepared to submit to Allah’s's will. During this preparation, when Satan tempted Prophet Ibrahim and his family, Hajar and Ismael drove Satan away by throwing pebbles at him. To remember this rejection of Satan, stones are thrown during Hajj.
At the time of sacrifice, Ibrahim discovered a sheep died instead of Ismail, whom he hacked through neck. When Ibrahim was fully prepared to complete the sacrifice, Allah revealed to him that his “sacrifice” had already been fulfilled. Ibrahim had shown that his love for his Lord superseded all others: that he would lay down his own life or the lives of those dear to him in order to submit to God. Muslims commemorate this superior act of sacrifice during Eid al-Adha.