In Madinah, the Prophet ﷺ was still staying in the house of Abū Ayyūb al-Anṣārī. His first concern was not his own lodging, but the founding of a center—a masjid that would be the heart of the community.
The place where his camel, Qaṣwāʾ, had knelt belonged to two young orphans, Sahl and Suhayl, from the clan of Banū al-Najjār, his maternal uncles’ family. The land had been used as a drying ground for dates. Their guardian, the Companion Asʿad ibn Zurārah, offered it freely, but the Prophet ﷺ refused to accept it without payment. Ten dinars were agreed upon, which Abū Bakr provided.
With land secured, the work began. The Prophet ﷺ himself joined the labor, carrying bricks with his Companions. To lift their spirits he recited: “There is no true life except the life of the Hereafter. O Allah, forgive the Anṣār and the Muhājirūn.” The believers echoed his words in chorus, chanting them like a song. ʿAbdullāh ibn Rawāḥah versified it into rhyme, and soon it became a chant that echoed through the worksite. Others, seeing the Prophet ﷺ lifting bricks while they stood aside, were stung by conscience and sang their own line: “If we rest while the Prophet works, what a loss it would be!” And so they too joined the labor.
Palm trunks were set upright for pillars. The walls rose with mud bricks. The roof was thatched with palm leaves, though some portions were left open to the sky. Anas ibn Mālik (RA) remembered: “The mosque was first built without a ceiling. Its qiblah was toward Bayt al-Maqdis. The Prophet ﷺ commanded that stagnant water in the ground be cleared, and the ancient graveyard with its scattered trees be leveled and prepared.” According to one narration, for twelve days the Prophet ﷺ prayed in this simple shelter, open to the sky.
Shahr ibn Ḥawshab narrates that when the Prophet ﷺ resolved to build the mosque, he said: “Make me a shelter like the hut of Moses—roofed with palm branches and stalks. For this world is more fleeting than that.” When asked about the hut of Moses, he explained: “It was so small and simple that if a man stood upright his head touched the roof.” With such humility the Prophet ﷺ began the construction with his Companions.
ʿAmmār ibn Yāsir recalled: “O Messenger of God, let me carry this brick instead of you.” And so while others bore one brick at a time, ʿAmmār carried two, straining under the load.
The mosque measured about thirty by thirty-five meters. It had three entrances: Bāb al-Raḥmah to the south, Bāb Jibrīl to the west, and Bāb al-Nisāʾ to the east. Seven years later the mosque would be rebuilt and expanded, but this humble structure was the foundation of all that followed.
Around the mosque, small living quarters were also constructed for the Prophet ﷺ—simple rooms called ḥujurāt in the Qur’an. Eventually nine such dwellings were raised, each scarcely thirty or forty square meters, modest huts of palm branches and mud. From Abū Ayyūb’s house the Prophet ﷺ moved into the first of these homes, on the northern side of the mosque.
Among the earliest acts after settling was the establishment of the Friday prayer. Even before his arrival, a Friday congregation had been held in Madinah at his instruction. But the first Jumuʿah after his migration was led by him in the valley of Rānūnā, at the dwelling of Sālim ibn ʿAwf. About one hundred believers prayed behind him. His khuṭbah there has been preserved:
“O people, guard yourselves before all else. Each soul will one day meet its Lord. No interpreter will stand between. God will ask: ‘Did not My Messenger come to you? Did I not grant you wealth in abundance? What have you brought in return?’ Then the man will look to his right, and he will see nothing. He will look to his left, and see nothing. He will look ahead, and see only the Fire. Whoever can shield himself from the Fire—even with half a date in charity—let him do so. If he cannot find even that, then let him guard himself with a good word. For every righteous deed is rewarded by God from tenfold up to seven hundredfold.”
Thus dawn broke in Madinah: a mosque rising from the earth, a community gathering around it, and a message echoing through its walls that the true life is the life of the Hereafter.






