A specific form of building for prayer did not exist at the time of the Prophet (peace be upon him).
The Arabic word ‘masjid’ means ‘a place of prostration.’ In the beginning, Prophet Muhammad (pbuh) gathered the community in his house in Medina to pray and to discuss communal affairs. During the first century of Islam, the mosque (a distortion of ‘masjid’) emerged as a separate building with distinct architectural features. This was the result of conquests of different lands where Muslims had to find their own restricted spaces. The space for the collective Muslims in a given settlement was called ‘masjid al-jami,’ ‘the mosque of the community,’ sometimes expressed as the “Friday mosque.”
By the end of the Middle Ages, the word ‘jami’ became a common equivalent to the ‘masjid.’ The only initial requirement of the mosque was a space large enough to contain the whole population of a given settlement. This space was oriented towards Mecca (the qibla). Gradually other requirements were introduced: a Mihrab or niche on the Qibla wall to emphasize the direction of prayer and to commemorate the presence of the Prophet (pbuh) in the midst of his followers; a Minbar or pulpit from which the sermon was given; various platforms for the readers of the Holy Quran and of other pious works; a Minaret which served to denote the presence of a Muslim centre and eventually to call the faithful to prayer.