Table of Contents
Arrival in a New Home
When the Messenger of Allah ﷺ reached Madinah after the Hijrah, he arrived not only as a refugee seeking safety, but as the head of a small yet growing community that needed structure, guidance, and a clear center. The migration transformed Islam from a small persecuted group in Makkah into an organized community with a public presence, laws, and shared institutions. The establishment of the Muslim community in Madinah was not accidental. It was a deliberate, wise, and gradual process guided by revelation.
Allah had already hinted at this transformation in the Quran while the Muslims were still in Makkah:
﴿وَالَّذِينَ هَاجَرُوا فِي اللَّهِ مِنْ بَعْدِ مَا ظُلِمُوا لَنُبَوِّئَنَّهُمْ فِي الدُّنْيَا حَسَنَةً﴾
“And those who emigrated for the cause of Allah after they had been wronged, We will surely settle them in this world in a good place.”
(Surah An Nahl 16:41)
Madinah became that “good place,” a base for Islam as a way of life, not only as a personal belief. In this new environment, the Prophet ﷺ began to build a community that was connected to Allah, united among its members, and organized in its public life.
In this chapter we will focus on how that community was first established in Madinah, and the central steps that created its foundations. Other aspects, such as later leadership and governance, will be treated in their own chapter.
Key idea: The establishment of the Muslim community in Madinah turned Islam from a persecuted faith into a complete, lived society with worship, mutual support, and public order.
A Community Built on Faith, Not Tribe
Pre Islamic Arabia was largely organized by blood ties and tribal loyalty. In Makkah, this structure worked against the early Muslims, because many families rejected and persecuted those who believed. In Madinah, the Prophet ﷺ was given the opportunity to build a community upon a different basis, the bond of faith.
Allah described this new kind of relationship in the Quran:
﴿إِنَّمَا الْمُؤْمِنُونَ إِخْوَةٌ﴾
“The believers are but brothers.”
(Surah Al Hujurat 49:10)
This verse did not only speak of feeling, it spoke of a new social reality. The Muslims in Madinah began to see each other as a single family, beyond blood or tribal origin. There were people from Makkah and from Madinah, rich and poor, Arab and non Arab, free and formerly enslaved, yet all of them were now part of one Ummah.
The Prophet ﷺ explained this brotherhood with clear words:
عَنْ النُّعْمَانِ بْنِ بَشِيرٍ رَضِيَ اللَّهُ عَنْهُمَا قَالَ، قَالَ رَسُولُ اللَّهِ ﷺ: «مَثَلُ الْمُؤْمِنِينَ فِي تَوَادِّهِمْ وَتَرَاحُمِهِمْ وَتَعَاطُفِهِمْ، مَثَلُ الْجَسَدِ، إِذَا اشْتَكَى مِنْهُ عُضْوٌ، تَدَاعَى لَهُ سَائِرُ الْجَسَدِ بِالسَّهَرِ وَالْحُمَّى»
Al Nu‘man ibn Bashir reported that the Messenger of Allah ﷺ said: “The example of the believers in their mutual love, mercy, and compassion is that of a single body. When one limb suffers, the whole body responds with sleeplessness and fever.”
(Al Bukhari and Muslim)
This image of the “single body” became real in Madinah. The establishment of the community meant putting this principle into action in daily life, in shared places, and in binding agreements. The Prophet ﷺ began by giving the community a clear center, a tangible space that would shape their identity.
The First Foundations in Madinah
When the Prophet ﷺ arrived at Quba’, near Madinah, he stayed among the Muslims there and built the first masjid, Masjid Quba’. Allah later mentioned this masjid as an example of a place founded on sincerity:
﴿لَمَسْجِدٌ أُسِّسَ عَلَى التَّقْوَى مِنْ أَوَّلِ يَوْمٍ أَحَقُّ أَنْ تَقُومَ فِيهِ﴾
“A mosque founded on righteousness from the first day is more worthy for you to stand in.”
(Surah At Tawbah 9:108)
From the very beginning, the Prophet ﷺ showed that the heart of the new community would be connection to Allah and gathering for worship. Very soon after entering the city itself, he chose the place that would become Al Masjid An Nabawi, the central masjid of Madinah, which will be discussed in detail in its own section.
In these first days, the Prophet ﷺ did far more than simply relocate individuals. He transformed migrants and locals into a single organized community. This involved three main dimensions. There was a spiritual center for worship and learning, there was a social bond that linked individuals with each other, and there was a public agreement that regulated relations within the city. Each of these will be studied separately in the chapters on the masjid, the brotherhood between the Muhajirun and the Ansar, and the Constitution of Madinah.
Here, it is important to see that all these steps were part of one coherent project. The Prophet ﷺ was not only teaching people how to pray. He was guiding them to live as servants of Allah in all parts of life, both private and public.
The establishment of the community in Madinah rested on three integrated pillars: a shared place of worship, a bond of brotherhood, and a written social agreement.
From Persecution to Protection
In Makkah, the believers often hid their faith and had almost no ability to protect themselves physically or organize openly. The shift to Madinah changed their situation in a decisive way. The Muslims now had:
A safe base where they could practice Islam without fear of systematic torture of the type many faced in Makkah.
A leader, the Prophet ﷺ, who was trusted by all groups of sincere believers, and who was recognized by many in Madinah as an arbiter and guide.
An opportunity to show Islam in action, as justice, mercy, and cooperation in society, not only as words secretly recited.
Allah described this favor of safety and unity as a blessing:
﴿وَاذْكُرُوا نِعْمَتَ اللَّهِ عَلَيْكُمْ إِذْ كُنتُمْ أَعْدَاءً فَأَلَّفَ بَيْنَ قُلُوبِكُمْ فَأَصْبَحْتُمْ بِنِعْمَتِهِ إِخْوَانًا وَكُنتُمْ عَلَىٰ شَفَا حُفْرَةٍ مِنَ النَّارِ فَأَنْقَذَكُمْ مِنْهَا﴾
“And remember the favor of Allah upon you when you were enemies and He brought your hearts together, so you became, by His favor, brothers. And you were on the brink of a pit of Fire, and He saved you from it.”
(Surah Aal Imran 3:103)
This verse refers to the situation of the people of Madinah before Islam, when their tribes, Aws and Khazraj, fought long wars. By embracing Islam and welcoming the Prophet ﷺ, they moved from war to peace and from division to unity. The establishment of the Muslim community in Madinah was therefore also a cure for old tribal hostilities.
A New Identity: From “Yathrib” to “Madinah”
Even the name of the city reflected the change. Before Islam, the place was known as Yathrib. After the Prophet ﷺ settled there, it became widely known as Al Madinah, “The City,” and also “Madinat An Nabi,” the “City of the Prophet.” One of its names in the sources is “Taybah” or “Tabah,” both implying goodness and purity.
In authentic narrations the Prophet ﷺ said:
عَنِ الْبَرَاءِ بْنِ عَازِبٍ رَضِيَ اللَّهُ عَنْهُمَا قَالَ، قَالَ النَّبِيُّ ﷺ: «إِنَّ اللَّهَ سَمَّى الْمَدِينَةَ طَابَةَ»
Al Bara’ ibn ‘Azib reported that the Prophet ﷺ said: “Indeed, Allah has named Madinah ‘Taba’ (or ‘Taybah’).”
(Muslim)
Though the change of name may seem simple, it signaled a deeper transformation. The city was no longer just a settlement of tribes. It had become the central place for an Ummah guided by revelation. The word “Madinah” itself comes from a root related to settlement, order, and even “deen” (religion and way of life). This foreshadowed that Islam in Madinah would not be limited to rituals, but would organize the life of the people.
The community’s identity was now tied to faith, to following the Prophet ﷺ, and to living by the guidance of the Quran. This identity was visible in the regular call to prayer, in shared worship, in public morals, and in the willingness of believers to help one another across old tribal lines.
The Role of Revelation in Building the Community
Much of the Quran that was revealed in Madinah deals with laws, social relations, and the conduct of the community. The Makkan revelations had focused heavily on faith in Allah, the Hereafter, and purification of the heart. These foundations were necessary first. Once there was a group of people whose belief was firm, Madinan revelation came to shape their common life.
In Madinah, the Quran spoke about inheritance, marriage, divorce, fasting, charity, relations with other religious groups, and conduct in peace and war. It also spoke about hypocrisy, which will be examined in another chapter. All of these teachings gradually sculpted the newly formed community.
One example of how revelation guided the community’s life is in the institution of Zakah, the obligatory charity that became a structural element of Muslim society:
﴿وَأَقِيمُوا الصَّلَاةَ وَآتُوا الزَّكَاةَ﴾
“And establish prayer and give Zakah.”
(Surah Al Baqarah 2:43)
This command did not create just a personal act of giving. It established a financial right of the poor over the wealth of the rich, collected and organized as part of the community’s system. It created a social safety net that reflected the brotherhood of believers.
Another example is the verse:
﴿وَكَذَٰلِكَ جَعَلْنَاكُمْ أُمَّةً وَسَطًا لِتَكُونُوا شُهَدَاءَ عَلَى النَّاسِ وَيَكُونَ الرَّسُولُ عَلَيْكُمْ شَهِيدًا﴾
“And thus We have made you a justly balanced community so that you may be witnesses over mankind and the Messenger be a witness over you.”
(Surah Al Baqarah 2:143)
Here, Allah defines the Ummah as “a justly balanced community,” given the responsibility to be witnesses over other peoples. This means that the Muslim community in Madinah was not intended to live closed in on itself. It was meant to represent and transmit divine guidance to the world by its words and by its example.
The Madinan revelation turned the believers into an “Ummah,” a community with responsibilities, laws, and a mission, not only individual worshippers.
The Prophet ﷺ as Teacher and Model in the New Community
In the established community of Madinah, the Prophet ﷺ was not only the Messenger who recited verses. He was the living example of those verses in every aspect of life. His home, his masjid, and his streets became places of learning.
Companions would narrate how they saw him deal with the poor, answer questions, resolve disputes, and show patience. Allah pointed to this role:
﴿لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ لِمَنْ كَانَ يَرْجُو اللَّهَ وَالْيَوْمَ الْآخِرَ وَذَكَرَ اللَّهَ كَثِيرًا﴾
“Indeed, in the Messenger of Allah you have an excellent example, for whoever hopes for Allah and the Last Day and remembers Allah much.”
(Surah Al Ahzab 33:21)
In Madinah, this “excellent example” was visible in the running of the community. He led them in prayer, consulted them in matters, visited the sick, received delegations, and at times went out for military expeditions. Every part of this life contributed to building a pattern for Muslims after him.
The gatherings in the masjid were not only for prayer. They were also places where new verses were taught, where questions were answered, and where newcomers to Islam were educated. Over time, some companions would dedicate themselves to frequenting the masjid, learning and preserving what they heard and saw. In this way, knowledge spread in the community and became part of its foundation.
Unity amid Diversity
The early community in Madinah was not uniform in origin. It included:
The Muhajirun, those who had migrated from Makkah, leaving behind wealth and sometimes families.
The Ansar, the helpers from among the people of Madinah who welcomed and supported the migrants.
Individuals from different tribes, and some who had been formerly enslaved.
Soon, there were also new Muslims from other areas, and people of other faiths living in the same city under mutual agreements, which will be discussed separately.
The Prophet ﷺ nurtured a sense of unity among the believers that could handle such diversity. Allah reminded them:
﴿إِنَّ هَٰذِهِ أُمَّتُكُمْ أُمَّةً وَاحِدَةً وَأَنَا رَبُّكُمْ فَاعْبُدُونِ﴾
“Indeed, this community of yours is one community, and I am your Lord, so worship Me.”
(Surah Al Anbiya’ 21:92)
Racial, tribal, and economic differences were not denied, but they were no longer the highest measure of a person’s worth. The Prophet ﷺ made this explicit in a famous statement during his final years, but its meaning was already present in Madinah’s daily life:
عَنْ أَبِي نَضْرَةَ قَالَ، قَالَ رَسُولُ اللَّهِ ﷺ: «يَا أَيُّهَا النَّاسُ، أَلَا إِنَّ رَبَّكُمْ وَاحِدٌ، وَإِنَّ أَبَاكُمْ وَاحِدٌ، أَلَا لَا فَضْلَ لِعَرَبِيٍّ عَلَى أَعْجَمِيٍّ، وَلَا لِأَعْجَمِيٍّ عَلَى عَرَبِيٍّ، وَلَا لِأَحْمَرَ عَلَى أَسْوَدَ، وَلَا لِأَسْوَدَ عَلَى أَحْمَرَ، إِلَّا بِالتَّقْوَى»
Abu Nadrah reported that the Messenger of Allah ﷺ said: “O people, indeed your Lord is one and your father is one. There is no superiority of an Arab over a non Arab, nor of a non Arab over an Arab, nor of a red over a black, nor of a black over a red, except by Taqwa (God consciousness).”
(Ahmad)
The social practices in Madinah, such as sharing homes, wealth, and labor between people of different backgrounds, made this principle real. The community was becoming a living answer to the divisions that had plagued Arabian society.
Social Responsibility and Mutual Care
A defining feature of the established community in Madinah was the sense of responsibility that each believer felt toward others. Islam did not allow someone to say, “My faith is only my private matter.” Instead, every Muslim had duties to the community and rights from it.
The Prophet ﷺ described this duty with clear warnings and encouragements. He said:
عَنْ أَبِي مُوسَى الْأَشْعَرِيِّ رَضِيَ اللَّهُ عَنْهُ، عَنِ النَّبِيِّ ﷺ قَالَ: «الْمُؤْمِنُ لِلْمُؤْمِنِ كَالْبُنْيَانِ، يَشُدُّ بَعْضُهُ بَعْضًا»
Abu Musa Al Ash‘ari reported that the Prophet ﷺ said: “The believer to the believer is like a building, each part supports the other.”
(Al Bukhari and Muslim)
He then interlocked his fingers to show how the parts fit together. This sense of mutual support translated into practical acts, such as feeding the hungry, helping new migrants, and standing with the weak. Zakah and voluntary charity both reinforced this.
In another hadith, he ﷺ stated:
عَنِ ابْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُمَا، أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ: «الْمُسْلِمُ أَخُو الْمُسْلِمِ، لَا يَظْلِمُهُ، وَلَا يُسْلِمُهُ»
Ibn ‘Umar reported that the Messenger of Allah ﷺ said: “The Muslim is the brother of the Muslim, he does not wrong him, nor does he abandon him.”
(Al Bukhari and Muslim)
To “abandon” here means to leave someone in a state where one could help him but chooses not to. In the established community of Madinah, such abandonment was strongly discouraged. Once the community had a physical and political base, it became capable of protecting its members and defending them when wronged.
In the Madinan community, faith in Allah included a duty of care and protection toward fellow believers, turning brotherhood from a slogan into daily practice.
The Ummah as a Witness to Others
The Muslim community in Madinah was not built only for its own comfort. Allah gave it a role in relation to other peoples and future generations. As mentioned earlier, the Quran described the believers as an “Ummah Wasat,” a just and balanced community. Part of this role was to show the world what a life guided by revelation looks like.
The presence of the Prophet ﷺ among them made this role even greater. They witnessed how he implemented the Quran, and in turn, their lives became part of the evidence for the truth of his message. Their behavior in trade, their fairness in dealing with non Muslims, and their response to hardship and success all became examples for others.
At the same time, the establishment of a community in Madinah prepared Islam to spread. Delegations would later come to Madinah to see Islam directly. They did not only listen to words. They observed a functioning society with norms and laws. The future expansion of Islam across Arabia and beyond began from this solid community base in Madinah.
Lessons from the Establishment of the Community
For a beginner studying the Seerah, it is important to realize that the Hijrah was not only a journey from one city to another. It marked the start of a new stage where Islam shaped a whole community. Several key lessons emerge from this:
Faith must move from the heart to society. The believers in Madinah lived their belief in their relationships, their economics, and their public order.
Unity requires a higher bond than blood. The Prophet ﷺ united people by faith and Taqwa, which allowed old hostilities to be overcome.
A strong community needs structure. The masjid, the brotherhood, and the written agreements formed a framework that protected and organized the Muslims.
Revelation guides every level of life. The Quran did not stay at the level of inner faith. It provided guidance for family, community, and public affairs.
Above all, the establishment of the Muslim community in Madinah shows that Islam, from the time of the Prophet ﷺ, was meant to be lived as a complete way of life that transforms individuals and societies, not just a set of private rituals. Subsequent chapters will look more closely at the specific institutions through which this community was built and sustained.