The mosque of Jinn is built at the place where a group of jinn are said to have gathered one night to hear the recitation of a portion of the Holy Quran by Prophet Muhammad (PBUH). Prophet Muhammad (PBUH) later met there with these jinn's leaders and accepted their embrace of Islam and their bayt (oath of allegiance) to him (SAW). The incident is mentioned in chapter al-Jinn of the Holy Quran.
The mosque is considered one of the oldest in Mecca and is one of the most important mosques visited in the city. The Mosque of the Jinn is located near Jannat al-Mualla. This Masjid is also known as the Mosque of Allegiance and the Mosque of Guards because the city guards would patrol up to that point.
Masjid Jinn or Masjid Haras, is built on the same spot where Prophet Muhammad (PBUH) made a line for Abdullah bin Masood who kept him (SAW) company after being commanded to recite the Holy Quran to the Jinn.