🐑 Online Qurbani 2026 is now available!Contact us today →
Islamic Guide

The Story of Hajj: Prophet Ibrahim, Hajar, and the Origin of the Pilgrimage

4 May 20266 min readHBSMWA

The story of Hajj began 4,000 years ago with Prophet Ibrahim, Hajar, and Ismail. Discover the events behind every Hajj ritual — from Sa'i to Qurbani.

The Story of Hajj: Prophet Ibrahim, Hajar, and the Origin of the Pilgrimage

Almost every ritual of Hajj — the running between hills, the stoning of pillars, the sacrifice on Eid, even the existence of the Kaaba itself — traces back to a single family that lived four thousand years ago. To perform Hajj is, in a very real sense, to walk in the footsteps of Prophet Ibrahim (peace be upon him), his wife Hajar, and their son Prophet Ismail (peace be upon him).

This is the story of Hajj.

A father with no son

Ibrahim was already an old man when, after years of supplication, Allah blessed him with his first son, Ismail, born to his wife Hajar. Ibrahim was a Prophet of Allah, called to spread the message of pure monotheism in a world that had drifted into idolatry. He had been thrown into a fire by his own people and emerged unharmed. He had argued with kings. And now, at last, he held his son.

But the test was not over.

The desert command

Ibrahim received a command from Allah: take Hajar and the infant Ismail to a barren valley in the Arabian desert, and leave them there.

Ibrahim obeyed. He brought them to the valley of Bakkah (later called Makkah), set down a small bundle of dates and a leather pouch of water, and turned to walk back toward Palestine.

Hajar called after him: "O Ibrahim, where are you going? Will you leave us in this valley where there is no person and nothing?"

Ibrahim did not turn around. So she asked again. Then a third time:

"Has Allah commanded you to do this?"

"Yes," Ibrahim answered.

Hajar's reply is one of the most powerful statements of trust in the Quran's narratives:

"Then Allah will not let us perish."

Ibrahim continued to walk. When he reached a point where they could no longer see him, he turned, raised his hands, and made the prayer recorded in Surah Ibrahim:

"Our Lord, I have settled some of my descendants in an uncultivated valley near Your Sacred House... so make hearts among the people incline toward them and provide for them from the fruits that they might be grateful." — Surah Ibrahim 14:37

Hajar's run between Safa and Marwa

The dates ran out. The water ran out. Ismail began to cry from thirst, and Hajar — desperate — climbed a small hill called Safa to look for any sign of help. Nothing. She ran across the valley to another hill, Marwa. Still nothing. Back to Safa. Back to Marwa. Seven times she ran, refusing to give up.

When she returned to her son, she found water gushing from the ground beneath his small feet. The well of Zamzam.

Hajar tried to contain the spring with her hands, saying "Zam, zam" — Arabic for "stop, stop." The water never stopped. It is still flowing fourteen hundred years after the Prophet Muhammad ﷺ was born, and forty centuries after Hajar's run.

This is why pilgrims today perform Sa'i — seven walks between Safa and Marwa — as part of Hajj. Every step is in honor of a mother's love and a mother's faith.

The settling of a community

Word of the spring spread. A passing tribe, the Jurhum, asked Hajar's permission to settle. She agreed. Around the well of Zamzam, a small community grew. Ibrahim returned periodically to visit his family.

Building the Kaaba

When Ismail was old enough, Allah commanded Ibrahim and Ismail to build the Kaaba — a simple cube-shaped structure to mark the first house of worship dedicated to the One God.

The two of them, father and son, raised the foundations together, reciting:

"Our Lord, accept from us. Indeed, You are the Hearing, the Knowing." — Surah Al-Baqarah 2:127

This is the same Kaaba that pilgrims circle today.

When the building was complete, Allah commanded Ibrahim:

"And proclaim to the people the Hajj; they will come to you on foot and on every lean camel; they will come from every distant pass." — Surah Al-Hajj 22:27

Ibrahim climbed a hill and called out the invitation. By Allah's command, that call has echoed across every century since.

The dream and the sacrifice

Years passed. Ismail grew into a young man. Then Ibrahim received a dream — and the dreams of prophets are revelation. In the dream, he was sacrificing his own son.

Ibrahim told Ismail. The son's response is preserved in the Quran:

"O my father, do as you are commanded. You will find me, if Allah wills, of the steadfast." — Surah As-Saffat 37:102

On the way to fulfill the command, Shaytan appeared three times to whisper doubt. Ibrahim threw stones at him each time. This is why pilgrims today stone three pillars (the Jamarat) during Hajj — they reenact Ibrahim's rejection of evil.

When Ibrahim laid Ismail down and raised the knife, Allah called out:

"O Ibrahim, you have fulfilled the vision." — Surah As-Saffat 37:104–105

Allah replaced Ismail with a ram. This is why pilgrims and Muslims worldwide perform Qurbani on Eid al-Adha — the sacrifice of an animal in remembrance of Ibrahim's complete submission and Allah's mercy.

The Prophet Muhammad ﷺ and the restoration of Hajj

Centuries passed. The Kaaba's original purpose — pure monotheism — was buried under layers of idolatry. By the time of the Prophet Muhammad ﷺ, the Kaaba housed 360 idols.

In 630 CE, the Prophet ﷺ entered Makkah, cleansed the Kaaba, and restored Hajj to its original purpose. Two years later, in 10 AH (632 CE), he performed his only complete Hajj — the Hajjat al-Wada (Farewell Hajj). He delivered his Farewell Sermon at Arafat, where he proclaimed the equality of all human beings before Allah.

He passed away three months later. The Hajj he taught is the Hajj Muslims perform today.

Every pilgrim is part of this story

When you stand at Arafat, you stand where the Prophet ﷺ stood. When you run between Safa and Marwa, you run where Hajar ran. When you stone the pillars, you stone what Ibrahim stoned. When you sacrifice on Eid, you remember what Ibrahim was willing to give.

This is why Hajj is not a tourist trip. It is the inheritance of a four-thousand-year story — and every Muslim is part of the next chapter.

The Qurbani that lives on

The most personal of Ibrahim's lessons — sacrifice — is the one every Muslim is asked to repeat each year. Qurbani is mandatory upon every financially able adult Muslim on Eid al-Adha, whether or not they are on Hajj.

Give your Qurbani 2026 with HBSMWA — your sacrifice feeds families in flood-affected Pakistan and in Palestine. The same Sunnah Ibrahim left, lived in our generation.


Read next: The 7 Steps of Hajj → · Surah Al-Hajj → · Why is Hajj Important? → · Back to Hajj guide →

🤲

Put Your Knowledge Into Action

Multiply your reward this Dhul Hijjah — give Qurbani, Sadaqah Jariyah, or Zakat through HBSMWA. 100% reaches those in need.

✅ 100% Donation Policy·🔒 Shariah-Compliant·📸 Photo Proof Every Appeal

As last year we did, this year we'll do with your generosity

Qurbani Impact 1
Qurbani Impact 2
Qurbani Impact 3
Qurbani Impact 4
Qurbani Impact 5
Qurbani Impact 6
Qurbani Impact 7