The Prophet (pbuh) and the Introduction of the Mosque in Madinah

Assoc. Prof. Dr. Spahic Omer
Kulliyyah of Architecture and Environmental Design
International Islamic University Malaysia

The first urban element introduced by the Prophet (pbuh) to the city of Madinah was the mosque institution which functioned as a community development center. While in Makkah, the Prophet (pbuh) and his followers were denied the existence and free utilization of their mosques, although they were in dire need of them. As a result, they were denied a free and proper practice of their new Islamic faith. They were thus denied some of their basic human rights. They were denied the freedom of thought, expression and practice of their beliefs. However, in order to offset partially this deficiency in Makkah, the first Muslims were utilizing some Muslim houses, or some quiet, secret and safe spots mainly on the outskirts of Makkah, to serve the purpose on an interim basis. They even got accustomed to going and visiting the Ka’bah or the al-Masjid al-Haram, albeit without openly and freely performing their religious rituals there. The al-Masjid al-Haram was then controlled by polytheists and polytheistic ideas and customs, both from inside the city of Makkah and from abroad. This way, only as much as symbolically could the al-Masjid al-Haram function as the mosque, as well as the nucleus, in the lives of the early believing Muslim community. Such a state of affairs continued for about 13 years following which Allah brought about a change and granted the Muslims and their Prophet (pbuh) that which they had been yearning for. They managed to migrate to Madinah where all the necessary conditions for establishing a well-structured, thriving, free and autonomous state existed.


To what extent the mosque institution was desirable both to propel the struggle for the Islamic cause to a higher level, and to spur and facilitate the overall progress of the Muslims and their young community, testifies the following event. On the way from Makkah to Madinah, the Prophet (pbuh) rested four, or fourteen, or eighteen, or twenty two days[1] in Quba’ — a suburb of Madinah about two to three miles to the southeast of the city – whence he next proceeded to his final destination, the city of Madinah proper. Even though his stay in Quba’ accounted for a short interval under some totally new circumstances which everyone was craving for, the Prophet (pbuh) succeeded in establishing a mosque there, “the Mosque of Piety”, to which he later during his subsequent stay in Madinah frequently came, riding or walking. The Prophet (pbuh) is said to have first positioned a stone on the mosque’s qiblah side (the qiblah then was towards the al-Masjid al-Aqsa) followed by Abu Bakr, who positioned another stone. Next, the people started building.

The Quba’ mosque was the first mosque built by the Prophet (pbuh). Thus, it occupies a special place in the Islamic tradition. The Prophet (pbuh) once said: “He who purifies himself at home and then proceeds to the Quba’ mosque for a prayer will procure the reward of the ‘umrah (the lesser pilgrimage).”[2] Certainly, it was because of this that the Qur’an referred to the Quba’ mosque as “the Mosque of Piety”. The Prophet (pbuh) loved to go and visit it.

That building and making the most of mosques was a matter of great urgency to the Prophet (pbuh) has been highlighted once again prior to the Prophet’s arrival into the city of Madinah proper. It was Friday when the Prophet (pbuh) set off from Quba’ to Madinah. On the way, before he arrived, the time for the Jumu’ah Prayer drew near. Being used to offering prayers wherever their appointed times overtook him, even if he happened to be in a sheepfold, the Prophet (pbuh) performed the Jumu’ah Prayer with the tribe of Banu Salim b. ‘Uwq because he happened to pass right through their quarter at the time of the prayer. They prayed most probably at a plain that functioned as a makeshift mosque of the Banu Salim b. ‘Uwq tribe. That was the Prophet’s first Jumu’ah Prayer in Madinah. The number of worshipers was about one hundred; some estimated that it was about forty.[3]

When Prophet Muhammad (pbuh) arrived in Madinah from Makkah – an exploit called hijrah or migration — the first and immediate task relating to the built environment, as well as to the community building process, that he embarked on fulfilling was building the city’s central mosque, also called the Prophet’s mosque. Every other undertaking, including building houses for the migrants (muhajirs) who were practically homeless, had to be put off till after the Prophet’s mosques was completed. Herein too lies a clue as to the extreme importance of the mosque and the profundity of its message in Islam.

When the migrants arrived in Madinah, almost all of them were destitute and virtually homeless. At the same time, furthermore, the aspiring community had no mosques or any other social institutions. While the first problem the Prophet (pbuh) was able to successfully manipulate and circumnavigate without really abandoning it and so causing any serious harm to the society, the latter predicament, however, could neither be disregarded, even for a short time, nor substituted with another feasible alternatives. Hence, the instituting of a principal mosque in Madinah needed the immediate attention. For the housing of the migrants, a workable alternative had to be found.

If the migrants had no houses of their own, there were many other houses in Madinah which if shared were able to offer a temporary relief. If truth be told, the migrants needed homes, rather than just houses. The Prophet (pbuh) sought to offer them the former. The latter, he knew, would come in a due course. The migrants might have hastened immediately to acquire houses for themselves. But such would have been at the expense of acquiring homes, because they were in a foreign country in Madinah, having been forced to abandon their homes, properties, family roots and quite a number of closest family members in Makkah. Thus, providing homes, and not houses, was a priority for the migrants. That exactly was the thing which the Prophet (pbuh) had in mind and the natives of Madinah (the helpers or ansar) were excited about offering as a solution till the migrants got the houses and homes of their own. Hence, the helpers offered their houses to be shared with their brethren from Makkah. The helpers offered the migrants a genuine home which, although transitory in nature, went a long way towards the realization of the Prophet’s and Islam’s mission in Madinah.

But there was nothing that could offset the absence of a mosque, the house of Allah, in Madinah. There was no existing structure, or an institution, that could offer any relief in case the establishment of a mosque was delayed. Even in the world of ideas, conceptually, a substitute for the mosque phenomenon did not exist. The matter thus could not be deferred, or taken lightly, as every forthcoming initiative utterly depended on it. Glorifying and worshipping Allah at a collective level could not have been deferred any longer. Perceiving and constructing a house of Allah, i.e., a mosque, for the purpose, was an obligation long overdue. The people were kept longing and craving for so long. Once in Madinah, they hardly could wait to bring their elongated unjustifiable misery to an end. Such is the importance of the mosque in the implementation of Islam as a comprehensive way of life. Such is the importance of the mosque, furthermore, in the development of the Islamic community, culture and civilization. The mosque is a lifeline for Islam and Muslims. On it, their survival depends.

Strengthening fraternity among the migrants (muhajirs) and helpers (ansar, or the natives of Madinah) was at all times one of the major goals of the Prophet’s plans and actions. His general planning and building pursuits were no exception. By planning and building his mosque, prior to anything else, the Prophet (pbuh) wanted very much to help everyone in Madinah in terms of their quick and smooth adaptation and acclimatization to what was transpiring around them. Thus, he wanted to help the migrants and ease their pain with reference to the new natural environment and climate in Madinah which they suddenly found themselves in and which apparently did not suit them well, as well as with reference to their distressing economic and psychological conditions that resulted from the migration. Also, the Prophet (pbuh) wanted very much to assist the helpers (ansar), or the natives of Madinah, to come to terms as quickly and as painlessly as possible with a new socio-political landscape that was forming in their homeland, and with a new code of life which most of them had freshly embraced.

While building the mosque, the Prophet (pbuh) postponed for a time building houses for the migrants. The houses were built after the completion of the mosque. During that period – approximately six or seven months – the migrants stayed together and shared almost everything with the helpers. They were thus of great mutual help to each other. They in a brotherly fashion helped each other overcome their respective problems and issues, one side treating the difficulties of the other as their own. The helpers not only had no objection to the prospects of being of service to their brethren from Makkah, but also felt quite honored about it. Indeed, the longer they stayed together, the stronger and warmer the relationship between them could have been fostered. The Prophet (pbuh) himself stayed in the house of a helper Abu Ayyub al-Ansari till the mosque and with it his first houses were completed. All the migrants, except the Prophet (pbuh), were distributed amongst the helpers by drawing lots.[4]

Indeed, a relationship of true brotherhood between the migrants and the helpers was a precondition for the Madinah society to succeed and for the mosque phenomenon to become fully operational in it. This way, while the mosque was in the process of building, its custodians and users, at the same time, were subjected to a series of spiritual and social upgradings and refinements deeply rooted in mutual care, love and respect. Their collective building of the Prophet’s mosque, while all staying together in the shared houses of the helpers (ansar), signified both an important segment of the process of a total transformation to which the helpers and migrants had been subjected, and a ground where the foremost results of such a process were becoming more and more apparent. So, when the mosque became ready, the people were ready too, but not just to use the mosque, but also to maximize its enormous potentials and to exploit them to the fullest for the good of the community. Indeed, both the Prophet’s mosque and the people were ready for each other. Their respective capacities corresponded to each other.

Towards the same end of optimizing the roles and function of the Prophet’s mosque, and equipping its guardians and users with the abilities and competence needed for tackling the challenges posed by their novel living conditions and realities, the Prophet (pbuh) following the migration legislated the system of mu’akhah (brotherly association) among the migrants (muhajirs) from Makkah and the helpers (ansar) from Madinah. The mu’akhah included 90 men, 45 from either side. While some claim that the mu’akhah took place soon after the building of the Prophet’s mosque, before the battle of Badr, others contend that it in fact occurred during the process of building the mosque.[5] The mu’akhah was accomplished in the house of Anas b. Malik.[6] So binding was the treaty that the migrants for sometimes were the heirs of the helpers, and vice versa, instead of their own kindred by blood. Later, however, the verse 33 from the chapter al-Nisa’ was revealed and the matter of the migrants and helpers inheriting one another was called off.[7]

Apart from the mu’akhah, or the brotherly association, the Prophet (pbuh) also organized the just relationships between the various inhabitants of Madinah, including the Jews, and recorded them in a document called the Constitution of Madinah. The commitments of each group within Madinah and its rights and duties were comprehensively enshrined in the document.

Also, in the course of building the Prophet’s mosque, the Prophet (pbuh) worked very hard on enhancing on the ground and in some practical terms the relations between the helpers and migrants, the future custodians of the mosque. He solicited both parties to keep mixing together and to take part in whatever work they could. The Prophet (pbuh) himself was active working and interacting with the people, thus setting an example to be followed. As a result, such was the general feeling that everybody worked together as a team and not a soul looked upon work as a burden or a strain. The people looked upon each other as brothers and sisters unified by the common faith and the life purpose, mission and goals. Even certain poetic verses were recited in the process. The Prophet (pbuh), evidently content with the goings-on, thus kept saying: “O Allah, there is no good except the good of the Hereafter, so have mercy upon the migrants and helpers!” The people used to chant these words as well.[8]

Aiming at an effective and speedy realization of the personality and community building mission in Madinah, the contents of the Prophet’s sermon (khutbah) during the first Friday Prayer (Jumu’ah) — as well as the contents of the other sermons of his at this particular juncture — emphasized the importance of such issues as faith (iman), taking hold of the good and leaving the evil, brotherhood, sincerity, steadfastness, gratefulness for the blessing of Islam, the significance of helping one another in virtue and goodness and not in malevolence and mischief, the common causes of Muslims, and the like.[9]

Prior to the hijrah (migration) of the Prophet (pbuh) from Makkah to Madinah, the latter was called Yathrib consisting of several loosely interrelated settlements. Its population was mainly made up of Arabs and Jews, the former being divided into the Aws and Khazraj tribes and the latter into Banu Qaynuqa’, Banu al-Nadir and Banu Qurayzah tribes. However, after the arrival of the Prophet (pbuh) and his companions from Makkah (muhajirs or migrants), as well as after the conversion of a majority of Madinah citizens to Islam, the city morphology and its population structure were set to change forever. The city’s name was expectedly altered in the process. Thus, the name Yathrib was changed into Madinah which means “the City”.

While planning his mosque, in particular, and the whole city of Madinah, in general, the Prophet (pbuh) was fully aware of Madinah’s historical and socio-economic complexities. His mosque, around which a majority of the people’s houses later were concentrated, he positioned in an area between the old Yathrib settlements — virtually in the middle of them — rather than either too far away from them or within the ambit of any of them. Thus, the message which was disseminated to all the people through the city’s focal point which contained the Prophet’s mosque and a majority of Madinah houses which were newly planned and built, was that Islam favors no person and no group on account of sheer history, culture or socio-political and economic status and affiliation. Everyone will be treated equally and will have a place in the forthcoming Madinah urbanization scheme, which will be spurred, facilitated and monitored by the Prophet’s mosque, a community development center. Everyone will be given an opportunity to make a contribution and shine. Everyone will be allowed to freely enjoy his or her rights, and, in turn, will be expected to responsibly discharge his or her duties and responsibilities. Credits will be given only on the basis of the people’s merit, piety, efforts made and righteous contributions to the society.

Since the Prophet’s mosque – around which the people’s houses later clustered — was established on a relatively uninhibited land, a majority of the migrants were honored to be able to build houses and settle near it. This way, justice was done to them for all the services they had rendered to the Islamic cause heretofore while in Makkah. As this also meant that the migrants, at the same time, were encouraged to work hard and become self-reliant and start a life on their own as soon as they could, thus becoming an asset to the modest and nascent community rather than a liability. Had the Prophet’s mosque been constructed somewhere within the ambit of any of the existing settlements and the migrants had to build their houses and settle elsewhere, there would have existed a real possibility of marginalizing some of them in certain aspects, making thereby their plight all the more difficult and with it the solicited integration and adaptation in Madinah an intricate task. In this case, their initial stay with the helpers would have been undeniably prolonged as well and both their self-sufficiency and contributions to satisfying the socio-political and economic needs of the city-state would have been somewhat forestalled for sometime.

Nor were the helpers held in contempt by not selecting the location of the Prophet’s mosque, and with it the midpoint of Madinah, in any of their established settlements. The arrival of Islam and the Prophet (pbuh) in Madinah meant that each and every avenue to reviving the centuries-old and all-encompassing antagonism between the two major Arab tribes in Madinah: Aws and Khazraj, had to be forever obstructed. Doing a favor to either Aws or Khazraj, by positioning the mosque and the city’s residential core in the settlement of either tribe, for example, while neglecting the other tribe, could have been one of such avenues, given the fact that the faith (iman) was yet to conquer the hearts of many individuals from each of the Aws and Khazraj tribes. Certainly, not positioning the Prophet’s mosque with its surrounding residential center in the ambit of either Aws or Khazraj was one of the wisest and most constructive moves that could have been made under the circumstances.[10]

When completed, the form of the Prophet’s mosque was extremely simple. It consisted of an enclosure with walls made of mud bricks and an arcade on the qiblah side (towards Makkah) made of palm-trunks used as columns to support a roof of palm-leaves and mud. There were initially three entrances which pierced the eastern, western and southern walls. The northern wall was the qiblah side facing the al-Masjid al-Aqsa – which was the first qiblah for about one year and a few months. However, as the qiblah was changed to face south towards Makkah, the southern entrance was subsequently bricked up and a wall on the northern side was pierced. Before the qiblah change there was, in all likelihood, no roofed area in the mosque, but after the change an arcade on the southern side facing Makkah was created. There was no decoration of any kind within or without the mosque.

The following is a standard description of the Prophet’s Mosque as given by most scholars: “In the construction method a stone foundation was laid to a depth of three cubits (about 1.50 meters). On top of that adobe, walls 75 cm. wide were built. The mosque was shaded by erecting palm trunks and wooden cross beams covered with palm leaves and stalks. On the qiblah direction, there were three porticoes, each portico had six pillars. On the rear part of the mosque, there was a shade, where the homeless Muhajirin took refuge. The height of the roof of the mosque was equal to the height of a man, i.e. about 3.5 cubits (about 1.75 meters)”[11]

It must be mentioned, however, that the notion of the mosque (masjid) was not instituted, nor were the mosques built, until the envisaged roles and position of the mosque institution in the forthcoming broad-spectrum development of the Muslim community were implanted into the hearts and minds of its custodians and users. The whole of the Prophet’s mission in Makkah, prior to the migration to Madinah where the first self-governing Muslim community was established, is to be seen in this light. That is to say, the Makkah period is to be seen as the laying of a foundation, as well as the setting up of a conceptual framework, for the Madinah period where the first physical manifestations of Islamic culture and civilisation came to pass. Hence, Allah describes the Quba’ mosque (the mosque which the Prophet (pbuh) had built in a suburb of Madinah on the way from Makkah) and its patrons in the following words: “…There is a mosque whose foundation was laid from the first day on piety; it is more worthy of thy standing forth (for prayer) therein. In it are men who love to be purified; and Allah loveth those who make themselves pure” (Al-Tawbah, 108).

Notwithstanding its unpretentious and rudimentary structure, the Prophet’s mosque from the very first day served as a real community centre quickly evolving into a multifunctional complex. It was meant not only for performing prayers at formally appointed times but also for many other religious, social, political and administrative functions. The main roles performed by the mosque were as a centre for congregational worship practices, a learning centre, the seat of the Prophet’s government, a welfare and charity centre, a detention and rehabilitation centre, a place for medical treatment and nursing, and a place for some leisure activities.

The Prophet’s mosque was the nerve-centre of the wide spectrum of the activities and aspirations of the fast-emerging Muslim Ummah. The impact of the mosque complex on the development of Madinah was such that the core of the city eventually grew to be almost ring-shaped, centring around the complex. Thus, the standard was set for every future Muslim city in terms of the role of its principal mosque(s), as well as its position vis-à-vis the rest of the city’s spatial components.

So eventful and bustling with life was the Prophet’s Mosque that after several years of existence it started to show signs that it could no longer comfortably accommodate the ever-growing number of worshippers, especially on Fridays. It therefore had to be enlarged, which the Prophet (pbuh) did following the conquest of Khaybar in the 7th year after the Hijrah. At first the mosque measured about 35 m by 35 m. After the enlargement, it measured about 50 m by 50 m.

At the outset, the Prophet’s mosque was very simple because its initial roles were simple, and the mosque’s roles were simple because the Muslim community in Madinah was in its infancy. In architecture, the three elements – the people’s needs, the function and form – are inseparable, and in the same order they call for each other. However, as the people’s engagements and so their requirements increased, the functions of the mosque multiplied in turn, calling for some noteworthy improvements in the mosque’s original austere form. Thus, during the Prophet’s time, his mosque evolved from a simple roofless and plain enclosure to a complex institution that featured, among other factors, a roofed section, a pavement outside one of its entrances, a minbar (pulpit) and a dakkah or dukkān (seat, bench) for communication purposes, lamps as a means for lighting up the mosque, several compartments that facilitated the various social functions of the mosque, and a person or persons whose job was to keep the mosque clean.

As the Prophet’s mosque was the centre of gravity in the wide-ranging affairs of the ever expanding Muslim community in Madinah, its strength and stature epitomised the strength and stature of Islam and the Muslims. The mosque seemed to be accommodative of every beneficial activity concerning worship (‘ibadah), education, politics, economy, security and social relations, which enabled the nascent and ambitious society to make some civilizational headway. The Prophet’s mosque was the microcosm of the Muslim society in Madinah and its struggle. Thus, it would be appropriate to say that talking about the Prophet’s mosque during the time of the Prophet (pbuh) is to talk about the people who instituted and then made the most of it. In the same vein, to talk about the stages which the mosque institution went through during the Madinah period of the Prophet’s mission is to talk about the stages which the Muslim community, and with it the Muslim mentality and spirituality, went through.

While exemplifying the strength and eminence of Islam and Muslims, the evolution of the Prophet’s mosque also exemplified in no less remarkable terms the Prophet’s contributions to the evolution of the identity of Islamic architecture. In fact, the origins of all the major principles of Islamic architecture can be traced back to the Prophet (pbuh) and his experiences while advancing the position of his mosque in Madinah from a simple unroofed enclosure to a multifunctional community development centre. Such principles, which are generally the principles of Islamic architecture, can be summarized as being: function–form relationship, peaceful coexistence with the environment (sustainable development), hygiene, comprehensive excellence, promoting just social interactions, “la darar wa la dirar” (there is no inflicting or returning of harm), aesthetics, economy, the relationship between the indigenous and the foreign influences, respecting people’s rights, avoidance of vices and nurturing and promoting virtues.



[1] See: Ibn Kathir, al-Bidayah wa al-Nihayah, (Beirut: Dar al-Kutub al-‘Ilmiyyah, 1985), vol. 3 p. 196.

[2] Ibn Majah, Sunan Ibn Majah, Kitab Iqamah al-Salah wa al-Sunnah fiha, Hadith No. 1402.

[3]Al-Samahudi, Wafa’ al-Wafa, (Beirut: Dar Ihya’ al-Turath al-‘Arabi, 1997), vol. 1 p. 258.

[4] Al-Bukhari, Sahih al-Bukhari, Kitab al-Jana’iz, Hadith No. 334.

[5] Akram Diya’ al-Umari, Madinan Society at the Time of the Prophet, (Herndon: The International Institute of Islamic Thought, 1991), p. 66.

[6] Al-Bukhari, Sahih al-Bukhari, Kitab al-Adab, Hadith No. 106.

[7] Ibid., Kitab al-Fara’id, Hadith No. 739.

[8] Al-Bukhari, Sahih al-Bukhari, Kitab al-Salah, Hadith No. 420.

[9] Ibn Kathir, al-Bidayah wa al-Nihayah, vol. 3 p. 211. Al-Tabari, The History of Prophets and Kings, (Albany: State University of New York Press, 1985), vol. 7 p. 2.

[10] Spahic Omer, The Prophet Muhammad (pbuh) and Urbanization of Madinah, (Kuala Lumpur: International Islamic University Malaysia, 2005), p. 151-154.

[11] Abbas Hamid, Story of the Great Expansion, (Jeddah: Saudi Bin Ladin Group, 1996), p. 226.

Leave a Reply

Your email address will not be published. Required fields are marked *