Source note: This article gives priority to the Quran and authenticated hadith. Later biographies help reconstruct the setting, but their dates and details are not treated as equal in authority to primary religious texts.
From Yathrib to Madinah
The Hijra in 622 CE changed more than the Prophet Muhammad’s place of residence. Yathrib became the centre of a religious community that included emigrants from Makkah, local supporters and other groups already living in the oasis. Islamic sources increasingly call the settlement al-Madinah—“the city”—while the Quran also preserves the older name Yathrib in Quran 33:13.
The Prophet’s arrival
Muslims had already been travelling from Makkah to Yathrib before the Prophet arrived. An authenticated report remembers Mus’ab ibn ‘Umayr and Ibn Umm Maktum teaching the Quran there, followed by other emigrants. The report also describes the exceptional joy with which the people received the Prophet: Sahih al-Bukhari 3925.
According to Sahih al-Bukhari 3932, the Prophet first stayed among Banu ‘Amr ibn ‘Awf for fourteen nights. He then entered the settled area surrounded by members of Banu al-Najjar and stayed near Abu Ayyub al-Ansari’s home. The same narration connects his arrival with the decision to build the mosque.
Muhajirun and Ansar
The Muhajirun had left homes, property and family networks in Makkah. The local Muslim supporters became known as the Ansar. The Quran praises those who welcomed the emigrants and preferred others even when they themselves faced need: Quran 59:9. This relationship helped displaced families establish themselves in a new city.
Madinah nevertheless remained socially diverse. Muslim emigrants and supporters lived alongside Jewish clans, Arab groups with different alliances and people whose commitment to the new community varied. Describing the city as instantly unified would oversimplify a gradual and sometimes difficult political process.
The mosque and public life
The mosque became a place of worship, teaching, consultation and communal gathering. Bukhari’s account says that the Prophet asked Banu al-Najjar to name a price for the land; they offered it seeking reward from God. The site was then cleared and prepared: Sahih al-Bukhari 1868.
This institutional work marks a new phase. In Makkah, the early Muslims had been a vulnerable minority. In Madinah, they also had to organise worship, welfare, dispute resolution and relations with neighbouring groups. Later historical literature preserves agreements often discussed as the “Constitution of Madinah.” The text is important, although scholars differ over its compilation and precise dating.
Why the change matters
The transformation of Yathrib into Madinah should not be reduced to a slogan or a story of effortless victory. It involved migration, hospitality, institution-building and negotiation. The strongest sources show a city welcoming the Prophet, a partnership between Muhajirun and Ansar, and a mosque at the heart of public life.
