The Hijra

الهجرة النبوية

c. 12 September 622 CE · c. 29 Safar 1 AH† – 24 September 622 CE · 12 Rabi' I 1 AH

† Hijri date derived by computation from the Gregorian/Julian date; it may differ from the transmitted date by a day or two.

Mecca → Ghar Thawr (Cave of Thawr) → Quba → Medina

The migration of the Prophet ﷺ Muhammad and his followers from Mecca to Medina in 622 CE, the event from which the Islamic calendar is counted. The Encyclopaedia of Islam links it to the loss of clan protection after the death of Abu Talib and to the agreement made at al-Aqaba during the pilgrimage of 622. Muhammad slipped out of Mecca with Abu Bakr, spent three days in a cave, and reached Quba near Medina, while his followers had already left in small parties.

DraftWritten with AI help from the sources it cites, and not yet read by a human editor.

Depth

At a glance

Era
The Prophetic Era
Region
Arabia
Identifiers
Wikidata

In time

610620630640 c.
Pre-Islamic Arabia · The Prophetic Era · The Rashidun Caliphate

In space

MeccaGhar Thawr (Cave of Thawr)QubaMedina

Map: Natural Earth, public domain · places and route from the graph

Refugees, migrants and diasporaSacred time

On screen

Reading levelRead it in the Kids' Wing

In the year 622, the Prophet ﷺ Muhammad travelled from Mecca to Medina. His friend Abu Bakr travelled with him. The journey through the desert was long. He reached Medina in the autumn, and the people were happy to see him. The Hijri calendar begins with this journey, and it is called the Hijra. When someone says "the year 1447 AH", they are counting the years from it.

In 622 the Prophet ﷺ Muhammad and his companions had lived through hard years in Mecca. A group of people came from a town called Yathrib and promised to protect the Prophet and welcome his companions. The Muslims began to travel from Mecca to Yathrib in small groups. Then the Prophet set out with his friend Abu Bakr. They stayed in a cave on a mountain for three nights, and Asma, Abu Bakr's daughter, brought them food. After a long journey through the desert they reached Quba, at the edge of the town. The Prophet then entered the town and stayed in the house of Abu Ayyub al-Ansari (may God be pleased with him), and Ali ibn Abi Talib (may God be pleased with him) joined him a short time later. The town got a new name, Medina, and became the first community of the Muslims. About fifteen years later the caliph Umar made the Muslim calendar begin from the year of this journey, which is why we say "the Hijri year".

Storytellers (10–12) read the Explorers text, then cross to the Scholars text.

The Hijra is the move of the Prophet ﷺ Muhammad and his companions from Mecca to Yathrib, which came to be known as Medina, in 622 CE. Years of harm in Mecca came before it, then the two pledges of Aqaba, in which a delegation from Yathrib undertook to protect the Prophet, and his companions began to leave for the town in small groups. The sira books relate that the Prophet left with Abu Bakr by night, that the two stayed three nights in the cave of Thawr, where Abdullah ibn Abi Bakr (may God be pleased with him) brought them news and Asma bint Abi Bakr (may God be pleased with her) brought them food, and that they then travelled to Medina with a guide named Abdullah ibn Urayqit. The Prophet reached Quba on the outskirts of Medina; the traditional date is 12 Rabi' al-Awwal of the first year. He then entered the town and stayed with Abu Ayyub al-Ansari (may God be pleased with him), and Ali ibn Abi Talib (may God be pleased with him) joined him a short time later. Historians debate the exact sequence of days, so the museum marks these dates as traditional. The Hijra was a turning point: the community that formed in Medina became the first Islamic political entity. About fifteen years later the caliph Umar ibn al-Khattab (may God be pleased with him) made the start of the Islamic calendar the first of Muharram of the year of the Hijra, which corresponds to 16 July 622 in the Julian calendar; this is why it is called the Hijri calendar.

Overview

The Hijra is the migration of the Prophet Muhammad from Mecca to Medina in 622 CE, the fourteenth year of the mission 1 2. His companions had already begun to emigrate to Medina before him 3 4. The Prophet left his house on the night of 27 Safar in the fourteenth year of prophethood, corresponding to 12/13 September 622 CE 1. He went out of Mecca with Abu Bakr and Abu Bakr's freedman Amir ibn Fuhayra; their guide was Abdullah ibn Urayqit 2. He hid in the cave of Thawr for three nights, and then travelled from the cave to Medina 5 6.

In al-Mubarakpuri's account he reached Quba on Monday 8 Rabi' al-Awwal, corresponding to 23 September 622 CE, and entered Medina on the Friday 7 8. Al-Mas'udi dates his entry into Medina to Monday, when twelve nights of Rabi' al-Awwal had passed, and says that he stayed at Quba until Thursday and set out on Friday 2. Ali ibn Abi Talib remained in Mecca three days after him, until he had handed over what he had been told to hand over, and then joined him 2. The Prophet lived in Medina for ten years 2. The Hijri calendar is counted from the Hijra: in the chapter on dating in Sahih al-Bukhari, Sahl ibn Sa'd says that they did not count from the Prophet's mission or from his death, but only from his arrival in Medina 9.

What happened

After years of hardship in Mecca, a delegation from Medina (which was then called Yathrib) pledged to protect the Prophet. His companions began to leave Mecca for the oasis in small groups. The Prophet left with Abu Bakr and reached the outskirts of Medina in autumn 622 CE. Ali ibn Abi Talib joined him a short time later. 3

The traditional date for arrival at Quba is 12 Rabi' al-Awwal of the first year AH. Historians debate the exact sequence of events, so the dates here are marked as traditional. 10

The word and its meaning

The article on the Hijra in the second edition of the Encyclopaedia of Islam, written by W. Montgomery Watt, points to the Arabic verb behind the word. Its first form means to cut someone off from friendly association or to avoid association with them, and its third form refers to a mutual ending of friendly relations. On this basis the author argues that hijra properly does not mean "flight", as it has traditionally been translated. 11

Why Muhammad left Mecca: the academic account

The sira works preserve the traditional narrative, and the article follows it in outline while labelling some of its details as doubtful. The author gives as the reason for leaving the loss of clan support after the death of Abu Talib, around 619, when Abu Lahab replaced him as head of the clan; Abu Lahab is said to have had commercial ties with some of Muhammad's bitterest opponents. After his visit to al-Ta'if, in 619 or 620, Muhammad had to seek the protection of the clan of Nawfal before he could enter Mecca again, and the author infers from this that Abu Lahab had refused to protect him. 11 The biographical article on Muhammad adds that after the deaths of Khadija and Abu Talib his position grew more and more hopeless, that the attempt at al-Ta'if failed and put him in physical danger, and that the sira accounts say he then obtained protection from Mut'im ibn Adi. Its author judges that his attempt to reform his native city must on the whole be regarded as having failed. 12 13

The agreement at al-Aqaba and the departures

According to the article, Muhammad sought a new field of activity and negotiated with representatives of all the main Arab clans of Medina. He concluded an agreement with them at al-Aqaba during the pilgrimage of 622, in June and July. It is known as "the pledge of war", because the men of Medina undertook to defend him by force of arms if necessary. 11 The Muhammad article places earlier contacts with Medinans who came as pilgrims in 621, a preliminary meeting at al-Aqaba, and then the formal agreement of 622 with a considerable number of Medinans, who pledged to take him into their community and protect him as one of their own citizens. The author notes that tradition mentions only this promise of protection, without further obligations. Museum records on these meetings are the pledges of Aqaba and the second pledge of Aqaba. 13

The article says Muhammad had already begun to encourage his Meccan followers to go to Medina, and that about seventy went in small parties. The Muhammad article adds that the negotiations could not stay hidden from the Meccans, caused great bitterness, and began, as Urwa says, a second period of trial for the believers. Followers are reported to have slipped away in large groups until only Muhammad and Abu Bakr, with the latter's servant, were left. It notes that some accounts, possibly Shi'i, say Ali also stayed in Mecca until the last moment. The author thinks Muhammad's staying behind was most likely part of a plan to keep the Hijra unobtrusive. 11 13

What Medina wanted

The Muhammad article gives its own reading of the situation. In the author's view the Medinans wanted a political leader who could readjust relations shattered by recent tribal conflicts, which had culminated in the battle of Bu'ath, more than they wanted an inspired preacher. It adds that the many Jews living there had helped make the Arab population somewhat familiar with monotheistic ideas. The author describes the responsibility Muhammad took on as awesome, since he became answerable for the safety and welfare of followers who were breaking their ties with tribe and family. 13

The departure, the cave and the road

The article retells what Ibn Ishaq reports. At a meeting of most of the clans of Quraysh, it was agreed that chosen young men, one from each clan, would attack Muhammad together with swords, so that the Hashimite clan could not take revenge on any single clan and would have to accept blood money. The young men gathered at his house, but he slipped away, leaving Ali in his bed so that they would think he was still asleep. The author says that whether or not this story is accepted, Muhammad must have left Mecca secretly in company with Abu Bakr, since a later Qur'anic passage recalls the two in the cave, Qur'an 9:40. 11

The two spent three days in the cave. They were then accompanied by Amir ibn Fuhayra, a freedman of Abu Bakr, and a nomad guide, and travelled on two camels by an unusual route to Medina. Ibn Ishaq dates their arrival at Quba, in the south of the oasis of Medina, to Monday 12 Rabi' I. The article gives 24 September 622 as the equivalent date and observes that this date was a Friday. It presumes they hid and avoided the main road because Muhammad, once out of Mecca, was no longer under the protection of Nawfal, yet would not be under the protection of his followers until he reached Medina. 11 The Muhammad article gives the same arrival on 12 Rabi' I, year 1, 24 September 622. 14

Historians on the cave story

The Muhammad article says that the traditional story, in which Muhammad and Abu Bakr stay behind until all the other Muslims have left and then hide in a cave, is embellished with later legendary details. It states that the Qur'anic verse may lend it some support, but that the verse is so ambiguous without added explanation that the cave story could equally be a later exegetical elaboration of it. The author also judges that at the time of the Hijra the Meccans probably did not see Muhammad as a threat, whether he was in Mecca or in Medina. These are the article's academic judgements; the earlier sections of this page, drawn from Muslim biographical works, relate the episode as it is traditionally told. 11 14

The emigrants

The article notes that in the document sometimes called the Constitution of Medina, those who made the hijra with Muhammad appear as the emigrants, the muhajirun, of Quraysh, with a collective standing comparable to that of one of the Arab clans of Medina. The status of muhajir came to be greatly prized. It could also be granted to people who had not made the journey. Members of nomadic tribes could pledge themselves to Muhammad with a pledge of migration, settle in Medina, and count as belonging to the emigrants. The tribe of Muzayna received the status without settling in Medina, and Aslam and Khuza'a were in a similar position. 11 15

Those who had gone to Abyssinia around 615 and stayed there until Muhammad brought them to Medina in 7/628 were counted as having made a hijra, namely to Abyssinia. The article suggests this may have been part of the inducement to go to Medina, and says that those who came back to Mecca before 622 and then joined Muhammad could claim two hijras. 15 The Muhammad article adds that the emigrants who stayed with Muhammad through the hard Meccan years held a special rank among the Muslims, and that the Medinan converts, called the Ansar, held a rank second only to theirs. 14

The article also records a later, different use of the term. The Kharijite leader Nafi ibn al-Azraq, whose followers were the Azariqa, held that only those who actively supported him were truly Muslims. He called them emigrants who had made the hijra to his camp, which he named the abode of hijra. 15

Earlier emigration to Abyssinia

The Muhammad article places the move to Medina after an earlier emigration of some followers to Abyssinia. It reports that Ibn Sa'd describes two such emigrations, the first group mostly returning to Mecca before the Hijra to Medina and the second mostly still in Abyssinia at the time, so that they went directly to Medina. Ibn Hisham and al-Tabari speak of only one migration, and al-Tabari names the first ten to go and ends with Ja'far ibn Abi Talib, followed by a steady stream of Muslims. The accounts agree that persecution in Mecca played a major part. Watt, the article says, has shown that the episode was more complex than the traditional accounts suggest, and that some emigrants may have gone to trade. 12

The era of the Hijra

The article states that Muslim dates are normally given by the era of the Hijra, abbreviated A.H. That era does not begin on the day Muhammad reached Medina, but on the first day of the lunar year in which this happened, which is reckoned to coincide with 16 July 622. The author adds that this result assumes that no intercalary months occurred after the Hijra, and that this is by no means certain. 15 The Muhammad article says the year of the migration was chosen with good reason as year 1 of the Islamic calendar, because it marks the start of ten years in which Muhammad led the building of a new religious community, which in a remarkably short time grew into one of the great civilisations of world history. 14

Significance

The community that formed in Medina became the first Islamic political entity. About fifteen years later, the caliph Umar made the start of the Hijri calendar the first of Muharram of that year, which corresponds to 16 July 622 CE in the Julian calendar.

For young visitors

The Hijra is the journey with which a new calendar began. When someone says "year 1447 AH," they are counting the years from it.

Stages in detail (The Sealed Nectar pp.161–174)

From Sheikh Omar Abdelkafy's Tafsir lectures (episode 4)

The Sheikh says that when the two entered the cave, two days later they were in Yathrib, and that the state arose from that cave 16.

Your choice is kept in this browser only.

Connections

Explore the connections

Had participant
Abdullah ibn Abbas· Abdullah ibn Abi Bakr· Abdullah ibn Mas'ud· Abdullah ibn Urayqit· Abu Ayyub al-Ansari· Abu Bakr al-Siddiq· Abu Burayda al-Aslami· Abu Dharr al-Ghifari· Abu Ubayda ibn al-Jarrah· Aisha bint Abi Bakr· Ali ibn Abi Talib· Amir ibn Fuhayra· Asma bint Abi Bakr· Bilal ibn Rabah· Hafsa bint Umar· Muhammad· Sa'd ibn Abi Waqqas· Suraqa ibn Malik· Umar ibn al-Khattab· Umm Ma'bad al-Khuza'iyya· Umm Salama (Hind bint Abi Umayya)· Umm Sharik al-Dawsiyya· Uthman ibn Affan· The early Muslim community· The Muhajirun· al-Zubayr ibn al-Awwam· Kulthum ibn al-Hidm· As'ad ibn Zurara· Sawda bint Zam'a
Led to
The Battle of Badr· The brotherhood of the Muhajirun and Ansar· The change of the qibla· The Constitution of Medina· The prescription of the Ramadan fast· The marriage of Fatima and Ali· The building of the Prophet's Mosque
Caused by
The emigration of the Muslims to Yathrib after the pledge· The journey from the cave of Thawr to Medina and the entry into the city· The Prophet's escape from his house on the night of the Hijra and the hiding in the cave of Thawr· The Pledges of Aqaba
Has part
The first Friday prayer· The three nights in the cave of Thawr· The departure night of the Hijra· The Hijra route· The sojourn at Quba
Occurred at
Mecca· Ghar Thawr (Cave of Thawr)· Quba· Medina
Part of
The Prophetic Era
Basis for
The Hijri calendar
Mentioned in
Qur'an 9:40· Qur'an 36:9· Qur'an 66:4· Bukhari 3905 — The long hijra narrative· Muslim 1864 — No emigration after the conquest, but jihad and intention
Subject of
The Biography of the Messenger of God 2026, episode 2: The Importance of Knowing Lineages in the Prophet's Biography· The Biography of the Messenger of God 2026, episode 3: The Birth of the Prophet· The Biography of the Messenger of God 2026, episode 8: Rise and warn: the beginning of the prophetic call· The Biography of the Messenger of God 2026, episode 11: Security awareness in the Prophet's biography· The Biography of the Messenger of God 2026, episode 14: How did Islam change Arab names?· The Biography of the Messenger of God 2026, episode 31: Why did some Companions return from Abyssinia only around the time of Khaybar?· The Prophetic Biography for Reformers, episode 5: The Secret Call· The Prophetic Biography for Reformers, episode 12: The journey to al-Ta'if, the Night Journey and the Ascension· The Prophetic Biography for Reformers, episode 13: The pledge of al-Aqaba· The Prophetic Biography for Reformers, episode 14: The Merit of the Ansar· The Prophetic Biography for Reformers, episode 15: The Hijra to Medina· Al-Buyut al-Amina (Safe Homes)· Al-Wa'd al-Haqq (The True Promise) programme· Congratulating on the new Hijri year· Sharh Sahih al-Bukhari (Explanation of Sahih al-Bukhari) programme· Tafsir al-Qur'an al-Karim (lecture series)· Wa Nalqa al-Ahibba (lecture series)· The Message
Related to
The periods and stages of the Prophet's call

People and things also explored

Muhammad· Medina· Abu Bakr al-Siddiq· Mecca· The Companions· The Battle of Badr· Sharh Sahih al-Bukhari (Explanation of Sahih al-Bukhari) programme· Umar ibn al-Khattab

Sources

  1. al-Raheeq al-Makhtum — Safi al-Rahman al-Mubarakpuri , p.163-164
  2. Muruj al-Dhahab — al-Masʼudi , p. 577
  3. Ibn Ishaq / Guillaume, The Life of Muhammad (1955)
  4. Sahih al-Bukhari , 3905
  5. al-Raheeq al-Makhtum — Safi al-Rahman al-Mubarakpuri , p.161
  6. al-Raheeq al-Makhtum — Safi al-Rahman al-Mubarakpuri , p.174
  7. al-Raheeq al-Makhtum — Safi al-Rahman al-Mubarakpuri , p.170
  8. al-Raheeq al-Makhtum — Safi al-Rahman al-Mubarakpuri , p.172
  9. Sahih al-Bukhari , 3934
  10. Watt, Muhammad at Medina (1956)
  11. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 3 p. 386
  12. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 7 p. 417
  13. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 7 p. 418
  14. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 7 p. 419
  15. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 3 p. 387
  16. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Tafsir Al Quran Al Qareem, episode 4, at 00:31:30 · Listen at the archive (opens the audio at this time)
  • al-Sira al-Nabawiyya — Ibn Hisham
  • Zad al-Ma'ad — Ibn Qayyim al-Jawziyya
Cite this page

islam.museum contributors. “The Hijra”. islam.museum, https://islam.museum/en/event/hijra/. CC BY-SA 4.0. Last updated 2026-11-24.

Improve this page on GitHub · Report an error · Help complete it · JSON

Wing

Time

Eras, timelines, this day in history, any year in the Islamic world.
Related

Muhammad

The Prophet of Islam (c. 570–632 CE), through whom Muslims believe the Qur'an was revealed, and the founder of the first Muslim community in Medina. The Encyclopaedia of Islam presents him both as the Messenger of God of Muslim faith, fully human, and as a historical figure, tracing his emigration to Medina in 622, the truce of al-Hudaybiya and the entry into Mecca, and it leaves the year of his birth open. It gives his death as a Monday in 632.