Miqat Dhu al-Hulayfah

The Mīqāt Dhu al-Ḥulayfah (مِيْقَات ذُو ٱلْحُلَيْفَة), also known as Masjid ash-Shajarah (مَسْجِد ٱلشَّجَرَة) or Masjid Dhu al-Hulayfah (مَسْجِد ذُو ٱلْحُلَيْفَة), is a miqat and mosque in Abyār ʿAlī, Medina, west of Wadi al-'Aqiq, where the final Islamic prophet, Muhammad, entered the state of ihram before performing 'Umrah, after the Treaty of Hudaybiyyah. The mosque is located 7 km SW of the Al-Masjid an-Nabawi and was defined by Muhammad as the miqat for those willing to perform the Hajj or Umrah pilgrimages from Medina. It is the second-largest miqat mosque after the Miqat Qarn al-Manazil in As-Sayl al-Kabir.

History
A hadith says that Muhammad "fixed Dhul Hulaifa as the Miqat for the people of Medina." The mosque was first built during the time of Umar II ibn 'Abdulaziz, who was the Umayyad governor of Medina from 706 to 712 (87-93 AH) and has been renovated several times since, the last major renovation being under King Fahd ((r. 1982 – 2005)), who increased the area of the mosque by many times its original size and added several modern facilities.

Architecture
The current mosque building was built during the reign of King Fahd. It is in the shape of a square of an area of approximately 6,000 square meters (65,000 ft2) inside a 36,000 m2 (388,000 ft2) square-shaped enclosure. It consists of two sets of galleries separated by a wide yard of approximately 1000 square meters (11,000 ft2). The galleries are shaped as arches ending with long domes. At the center of the mosque is spring of water housed inside a dome. The portion of the enclosure that does not include the mosque, measuring around 20,000 m2 (216,000 ft2), includes multiple restrooms and areas for changing into ihram and performing wudu. Most of the inner area is pathways, galleries and trees. All 13 domes are located on the roof of the mosque, while the 5 minarets are located around the enclosure. One of the mosque's minarets stands distinct from the others, square at the bottom but round at the top in a diagonal shape, rising to a height of 64 m. The mosque is built in an Islamic architectural style, with Mamluk and Byzantine influences.