The original Prophet's Masjid was built by the Prophet himself, next to the house where he settled after his Hijrah to Medina in 622 AD. It was an open-air building with a raised platform for the reading of the Qur'an.
A square enclosure of 30x35 meters, the Masjid was built with palm trunks and mud walls and accessed through three doors: Bab Rahmah to the south, Bab Jibril to the west and Bab al-Nisa' to the east. The basic plan of the building has since been adopted in the building of other Masjid throughout the world.
Inside, the Prophet created a shaded area to the south called the suffrah and aligned the prayer space facing north towards Jerusalem. When the qibla (prayer direction) was changed to Makkah, the Masjid was re-oriented to the south. The Masjid also served as a community center, a court, and a religious school. Seven years later (629 AD/7 AH), the Masjid was doubled in size to accommodate the increasing number of Muslims.
Subsequent Islamic rulers continued to enlarge and embellish the Prophet's Masjid over the centuries. In 707, Umayyad Caliph al-Walid (705-715) tore down the old structure and built a larger one in its place, incorporating the house and tomb of the Prophet.
This Masjid was 84 by 100 meters in size, with stone foundations and a teak roof supported on stone columns. The Masjid walls were decorated with mosaics by Coptic and Greek craftsmen, similar to those seen in the Umayyad Masjid in Damascus and the
Dome of the Rock in Jerusalem (built by the same caliph). The courtyard was surrounded by a gallery on four sides, with four minarets on its corners. A mihrab topped by a small dome was built on the qibla wall.
Abbasid Caliph al-Mahdi (775-785) destroyed the northern section of al-Walid's Masjid between 778 and 781 to enlarge it further. He also added 20 doors to the Masjid: eight on each of the east and west walls, and four on the north wall.
During the reign of the Mamluk Sultan Qala'un, a dome was erected above the house and tomb of the Prophet and an ablution fountain was built outside of Bab al-Salam. Sultan Nasir bin Muhammad bin Qala'un rebuilt the fourth minaret that had been destroyed earlier. After a lightning strike destroyed much of the Masjid in 1481, Sultan Qaytbay rebuilt the east, west and qibla walls.
The Ottoman sultans who controlled Medina from 1517 until World War I also made their mark. Sultan Suleyman I (1520-1566) rebuilt the western and eastern walls of the Masjid and built the northeastern minaret known as al-Suleymaniyya. He added a new mihrab (al-Ahnaf) next to the Prophet's mihrab (al-Shafi'iyyah) and placed a new dome covered in lead sheets and painted green above the Prophet's house and tomb.
During the reign of Ottoman Sultan Abdulmecid I (1839-1861), the Masjid was entirely remodeled with the exception of the Prophet's Tomb, the three mihrabs, the minbar and the Suleymaniyya minaret. The precinct was enlarged to include an ablution area to the north. The prayer hall to the south was doubled in width and covered with small domes equal in size except for domes covering the mihrab area, Bab al-Salam and the Prophet's Tomb.
After the foundation of the Saudi Kingdom of Arabia in 1932, the Masjid of the Prophet underwent several major modifications. In 1951 King Abdul Aziz (1932-1953) ordered demolitions around the Masjid to make way for new wings to the east and west of the prayer hall, which consisted of concrete columns with pointed arches. Older columns were reinforced with concrete and braced with copper rings at the top. The Suleymaniyya and Majidiyya minarets were replaced by two minarets in Mamluk revival style. Two additional minarets were erected to the northeast and northwest of the Masjid. A library was built along the western wall to house historic Qurans and other religious texts.
In 1973 Saudi King Faisal bin Abdul Aziz ordered the construction of temporary shelters to the west of the Masjid to accommodate the growing number of worshippers in 1981, the old Masjid was surrounded by new prayer areas on these sides, enlarging five times its size. The latest renovations took place under King Fahd and have greatly increased the size of the Masjid, allowing it to hold a large number of worshippers and pilgrims and adding modern comforts like air conditioning.
As it stands today, the Prophet's Masjid has a rectangular plan on two floors with the Ottoman prayer hall projecting to the south. The main prayer hall occupies the entire first floor. The Masjid enclosure is 100 times bigger than the first Masjid built by the Prophet and can accommodate more than half a million worshippers.
The Prophet's Masjid has a flat paved roof topped with 24 domes on square bases. Holes pierced into the base of each dome illuminate the interior. The roof is also used for prayer during peak times, when the 24 domes slide out on metal tracks to shade areas of the roof, creating light wells for the prayer hall. At these times, the courtyard of the Ottoman Masjid is also shaded with umbrellas affixed to freestanding columns. The roof is accessed by stairs and escalators. The paved area around the Masjid is also used for prayer, equipped with umbrella tents.
The north façade has three evenly spaced porticos, while the east, west and south façades have two. The walls are composed of a series of windows topped by pointed arches with black and white voussoirs. There are six peripheral minarets attached to the new extension, and four others frame the Ottoman structure. The Masjid is lavishly decorated with polychrome marble and stones. The columns are of white marble with brass capitals supporting slightly pointed arches, built of black and white stones. The column pedestals have ventilation grills that regulate the temperature inside the prayer hall.
This shiny new Prophet's Masjid contains the older Masjid within it. The two sections can be easily distinguished: the older section has many colorful decorations and numerous small pillars; the new section is in gleaming white marble and is completely air-conditioned.
The most notable feature of the Prophet's Masjid is the green Dome of the Prophet, which rises higher amongst the sea of white domes. This is where the tomb of the Prophet Muhammad saw is located; early Muslim leaders Abu Bakar ra and Umar ibn al-Khattab ra are buried in an adjacent area as well.
At the heart of the Masjid is a small area called ar-Rawdah an-Nabawiyah (Arabic: الروضة النبوية), which extends from the tomb of the Prophet to his pulpit. All pilgrims attempt to visit and pray in ar-Rawdah, for there is a tradition that supplications and prayers uttered here are never rejected. Entrance into ar-Rawdah is not always possible (especially during the Hajj), as the tiny area can accommodate only a few hundred people. Ar-Rawdah has two small gateways manned by Saudi soldiers charged with preventing overcrowding in the tiny area. The green fence at the tomb of Muhammad is guarded by Wahhabi volunteers, who prevent pilgrims from touching the fence, which the Wahhabis regard as idolatry. The structure called Muhammad's pulpit is similarly guarded. The current marble pulpit was constructed by the Ottomans; the original was much smaller and made of palm tree wood.