Mosque of the Jinn

The Mosque of the Jinn (مسجد الجنّ) is a mosque in Mecca, Saudi Arabia, located near Jannat al-Mu'alla. It is also known as the Mosque of Allegiance (مسجد بِيعات) and the Mosque of Guards (مسجد الحرس) because the city's guards would patrol up to that point.

The mosque 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 Quran by Muhammad. Muhammad later met there with these jinn's leaders and accepted their embrace of Islam and their bay'ah (oath of allegiance) to him. The incident is mentioned in chapter al-Jinn of the Quran.

The mosque is considered one of the oldest in Mecca and is one of the most important mosques visited in the city.