The word masjid is derived from sajd (prostration), thus it means the place of prostration. The English word mosque derives via French mosquee, the old French mousquaie, the old Italian moschea and moscheta, while moschee in German and mescit in Turkish – all came from the Arabic via Spanish mezquita. In East Africa, the mosque is commonly spoken of in Swahili as msikiti (pl. misikiti). In Indonesia, it is pronounced as mesigit, masigit and maseghit. The Chinese call it Ch’ing-chen ssu.
The word masjid is derived from the Aramaic masged, meaning place of worship. The word masjid appears 27 times in the Koran, 15 times in the phrase al-masjid al-haram (the holy mosque). It is used once in the phrase al-masjid al-aqsa (the farthest mosque).
In Mecca, the Muslim community had no special place of worship. The Prophet used to perform the salat in secret in the narrow alleys of Mecca (Ibn Hisham, p. 159). The references are usually to the solitary salat of the Prophet, sometimes beside the Kaba (Ibid., p. 190), sometimes in his house (Ibid., p. 203). The first mosque of Islam was built in Kuba. On his migration, the Prophet halted with the family of Amir b. Awf, where he stayed for 14 days. He founded the mosque on a site, which belonged to his host Kulsoom and was used as a place for drying dates. According to others, to a woman named Labba, who tethered her ass there. The Prophet made Abu Bakr first, then Umar without success, then Ali bin Abu Talib mounted a camel to bring stone from the Harra. Thus, the Prophet laid the first stone for the foundation of the mosque in Kuba.
In Medina, the Prophet took up his abode with Abu Ayub Ansari, but during the first period of his stay in Medina, he conducted the salat in the house of Abu Umama Asad. Later, the Prophet expressed desires to purchase the adjoining piece of ground in Medina, and bought it from the two orphans, Sohal and Sohail, who were wards of Asad. The site measuring 54 yards width and 60 yards in length was cleared, the palms cut down and the walls built. The building material was bricks baked in the sun (labin). On the north wall, at first left open, the stems of the palm trees which had been cut down were soon set up as columns and a roof was put over them of palm-leaves and clay. On the east side two huts of similar materials were built for the Prophet’s wives. When the qibla was moved to the south, the arbour at the north wall remained; under the arbour called suffa or zulla, the homeless Companions (ahl as-suffa) found shelter (Bukhari, 48:62). In seven months, the work was completed. The mosque became known as the Prophet’s Mosque (masjid-i nabwi). It was free from all kinds of artificialities and was a monument of simplicity, having only a courtyard with a wall around it. It was the courtyard of the Prophet’s houses and at the same time the meeting-place for the believers and the place for common prayer. The unconverted Thaqifis were once received by the Prophet in the mosque to conduct negotiations and he even put up three tents for them in the courtyard (Ibn Hisham, p. 916). The envoys from Banu Tamim also went freely about in the mosque and called for the Prophet, who dealt with them after he had finished prayers (Ibid., p. 933). The Ahl al-Kitab and their servants were allowed to enter the mosque of Medina (Masnad, 3:339). But at a later date, entrance was forbidden to Christians and this regulation is credited to Umar. At a later period, the khutba was delivered exceptionally, without minbar and only with staff, until Marwan b. Muhammad in 132/750 introduced the minbar into the Egyptian villages (Makrizi, 4:7).