In Madinah the Prophet ص did not only lead prayers; he built a whole community founded on faith, justice and brotherhood, offering a model of how believers should live together.
The mosque and brotherhood
One of the Prophet's ص first actions was to build a mosque, the Masjid an-Nabawī, which became the heart of the community for worship, learning and gathering. He then joined each emigrant (Muhājir) with a helper (Anṣārī) in a bond of brotherhood, so that the Ansar shared their homes and wealth with the newcomers. This showed that faith can unite people more strongly than tribe or wealth.
The Constitution of Madinah
The Prophet ص drew up an agreement, often called the Constitution of Madinah, setting out how the different groups in the city, including the Jewish tribes, would live together. It established that:
- each group had rights and responsibilities
- disputes would be settled justly
- the city would be defended together
This was an early example of a fair agreement between different communities living side by side.
Living justly with neighbours
The Prophet ص taught that a believer must be a good neighbour. He said that the angel Jibrīl kept urging kindness to neighbours so much that he thought neighbours might even be given a share of inheritance. Muslims were taught to keep their promises, deal honestly and treat non-Muslims living peacefully among them with fairness and respect.
The peaceful return to Makkah
Though there were times of conflict, the Prophet ص always preferred peace. The Treaty of Ḥudaybiyyah was a peace agreement that, though it seemed disappointing at first, opened the way for Islam to spread. Later, when the Muslims returned to Makkah, the Prophet ص entered the city peacefully and, instead of taking revenge on those who had harmed him, he forgave them, saying they were free. The idols were removed and the Ka'bah was restored to the worship of Allah alone.
Put these steps in building the community of Madīnah in order:
- The Prophet ﷺ builds the Masjid an-Nabawī, the mosque of Madīnah
- Each Muhājir is paired with an Anṣārī in a bond of brotherhood
- The Constitution of Madīnah sets out how the city's groups will live together
- The Treaty of Ḥudaybiyyah opens the way for Islam to spread
- The Prophet ﷺ returns peacefully to Makkah and forgives his former enemies