At a glance
Stage 6The Prophet ﷺ chose a plain yard in Madinah where his camel knelt, paid for it, and built there with his Companions the mosque that became the centre of the community.
- When
- 1 AH (622 CE), with the change of the prayer direction in 2 AH (624 CE)
- Where
- Madinah, in the quarter of the Banu Najjar
- Known as
- Al-Masjid an-Nabawi, the Prophet's ﷺ Mosque
- Key people
- The Prophet ﷺ, Abu Ayyub al-Ansari, Bilal ibn Rabah, Ammar ibn Yasir
- Key places
- Quba, the yard of the two orphans, the Prophet's ﷺ Mosque
- Read time
- 5 minutes
Part oneWhere the camel knelt
The people of Madinah had been watching the road for days. Before Islam the oasis was called Yathrib, and it would soon be known simply as Madinah, the city. After resting at Quba, where he had founded a mosque, the Prophet ﷺ set out for the town itself. He prayed the Friday prayer on the way, with a gathering of the Banu Salim in a valley outside the town, and then rode on.
Families from every clan of the Aws and Khazraj came out to meet him. Each one hoped he would stop at their door. They took hold of the camel's halter, offered their homes and their food, and asked him to stay. He thanked them and told them to leave her way clear, because she was under command and would stop where she was meant to.
She walked on through the lanes and palm groves of the oasis and knelt in an open yard in the quarter of the Banu Najjar. These were his relatives through the mother of his grandfather, Abdul-Muttalib. She rose, went a little further, then turned back and knelt in the very same spot. The Prophet ﷺ said that this, if Allah willed, was the place.
The yard was where dates were spread out to dry. It belonged to two orphan boys. The Banu Najjar offered it freely, but the Prophet ﷺ would not take an orphan's land as a gift, and he insisted on paying a fair price.
Until his own rooms were ready, he stayed with Abu Ayyub al-Ansari (may Allah be pleased with him), whose house stood close by. Abu Ayyub offered him the upper floor. The Prophet ﷺ asked for the lower one, since visitors would be coming all day. Abu Ayyub and his wife slept uneasily with their guest below them, and they asked again until he agreed to change places. A man who now led a city still worried about being a burden on one family's home.
The first advice that people remember from him in Madinah was short and practical. He told them to spread peace, to feed others, to keep their family ties, and to pray at night while others slept.
Part twoBrick, palm trunks and a roof of branches
The site was not empty. There were old graves from before Islam, some ruined walls, a few date palms and rough ground. The graves were moved, the ground was levelled and the palms were cut down. Their trunks became the posts that held up the roof.
The walls were mud brick set on a base of stone. The roof was palm branches laid over with mud. The floor was bare earth. It was a courtyard open to the sky, with a shaded area along the wall that faced Jerusalem, the direction of prayer at that time. There was no dome and no minaret. Later, after rain turned the floor to mud, pebbles were laid over it.
Nearly everyone took part in the building. The Prophet ﷺ carried bricks with the others, and the Muhajirun, the emigrants from Makkah, and the Ansar, the helpers of Madinah, worked side by side. Ammar ibn Yasir (may Allah be pleased with him), who had suffered torture in Makkah for his faith, carried two bricks at a time where others carried one. Men who had been strangers a few weeks earlier were passing bricks hand to hand.
Small rooms of mud and palm branches went up along one side of the courtyard for the Prophet's ﷺ family, with doors that opened onto the mosque. From his house he could step straight into the place where the community gathered.
From the hadith
Narrated Abu Huraira:
Allah's Messenger (ﷺ) said, "One prayer in my Mosque is better than one thousand prayers in any other mosque excepting Al-Masjid-AI-Haram."
Part threeA mosque that did everything
The mosque was first of all a place of prayer. In those early days there was no fixed way of calling people together, and the Companions talked about using a bell or a horn. Then Abdullah ibn Zayd (may Allah be pleased with him) saw in a dream the words of a call to prayer, and Umar ibn al-Khattab (may Allah be pleased with him) reported seeing the same. The Prophet ﷺ told Abdullah to teach the words to Bilal ibn Rabah (may Allah be pleased with him), whose voice was clear and strong. From a rooftop beside the mosque, Bilal gave the first adhan of Madinah.
It was much more than a prayer hall. The Quran was recited and taught there. The Prophet ﷺ met delegations and settled disputes there, and travellers who had nowhere to go could sleep there. At first he gave the Friday sermon leaning against a palm trunk. Later a simple wooden pulpit with steps was made for him.
A covered corner became a home for the Ahl as-Suffah, poor Muslims who had no family in the city. They studied, they were fed from what others brought, and many of them became carriers of knowledge. Abu Hurayrah (may Allah be pleased with him), who later narrated more of the Prophet's ﷺ words than anyone, was among them. Women prayed and attended lessons in the mosque too.
About a year and a half after the Hijrah, the direction of prayer changed. The Muslims had faced Jerusalem since before the Hijrah. In 2 AH the command came to turn towards the Kaaba in Makkah, and a congregation in Madinah turned in the middle of its prayer. Accounts differ on whether this was sixteen or seventeen months after the Hijrah.
From the Quran
قَدْ نَرَىٰ تَقَلُّبَ وَجْهِكَ فِى ٱلسَّمَآءِ ۖ فَلَنُوَلِّيَنَّكَ قِبْلَةً تَرْضَىٰهَا ۚ فَوَلِّ وَجْهَكَ شَطْرَ ٱلْمَسْجِدِ ٱلْحَرَامِ ۚ وَحَيْثُ مَا كُنتُمْ فَوَلُّوا۟ وُجُوهَكُمْ شَطْرَهُۥ ۗ وَإِنَّ ٱلَّذِينَ أُوتُوا۟ ٱلْكِتَـٰبَ لَيَعْلَمُونَ أَنَّهُ ٱلْحَقُّ مِن رَّبِّهِمْ ۗ وَمَا ٱللَّهُ بِغَـٰفِلٍ عَمَّا يَعْمَلُونَ ١٤٤
Indeed, We see you ˹O Prophet˺ turning your face towards heaven. Now We will make you turn towards a direction ˹of prayer˺ that will please you. So turn your face towards the Sacred Mosque ˹in Mecca˺—wherever you are, turn your faces towards it. Those who were given the Scripture certainly know this to be the truth from their Lord. And Allah is never unaware of what they do.
The mosque has been enlarged many times since. Today it holds crowds far larger than that first courtyard, and it includes the room where the Prophet ﷺ was later buried. The land beneath it is still the yard he paid for.
A man who now led a city still worried about being a burden on one family's home.
More on How to Muslim
WatchLectures for this chapter
The mapWhere it happened
- Quba
- the quarter of the Banu Najjar
- the house of Abu Ayyub
- the Prophet's ﷺ Mosque
This map is a simple sketch to help you picture where events took place. Positions, distances and borders are approximate, so please use it for reference only, not as an accurate map.
SourcesSources for this chapter
The books, lectures and maps behind this page are listed on our Sources page.