Some Muslims believe that non-Muslims are prohibited in Islam from entering any mosque. In some Muslim communities, however, mosques are open for educational, interfaith and tourism purposes; and some even have Open Day for people to come into the mosque and learn more about Islam.
Should non-Muslims be allowed into a mosque?
People of various faiths, including Jews, Christians and Polytheists, entered into the great mosque of the Prophet Muhammad (p) in Medina during his lifetime and after that. This is the second most sacred mosque for Muslims. Most of the Prophet’s meetings with numerous delegations of non-Muslims were held during the last years of his life in Medina. It is also reliably reported that he received some visitors who polytheists of the tribe of Banu Thaqif from Ta’if in his Mosque in the year 9 AH. Al-Mubarakfuri, author of the acclaimed biography of the Prophet (p), the Sealed Nectar (2002), writes that their “tent was erected in the corner of the mosque so that they could listen to the Qur’an and see the people in prayer.”
Another well-known case was where up to 60 Christians from Najran met with the Prophet (p) in his mosque in Medina in the year 10 AH. They were there for 3 days. During their stay in the mosque, they discussed various issues with him. They ate, relaxed, and even slept in the Mosque.
The same authorities also narrated that they were even allowed by the Prophet (p) to say their own Christian prayer service in his Mosque. Based on this, Ibn Qayyim al-Jawziyyah said, “in this (incident of the Christians of Najran) is a (precedence of) permission for them to enter the mosques of Muslims; it makes it possible for them to offer their prayers in the presence of Muslims and in their mosques too, if the situation incidentally demands that.” This shows the extent of respect the Prophet (p) had for the right of these Christians to practice their faith.
Furthermore, the hadith collection of Imam Bukhari has records of non-Muslim prisoners of war, such as Thumama bin Uthal who were held captive in the mosque. Imam al-Shafi‘i writes in al-Umm, “If a polytheist could sleep in a mosque, then definitely a Muslim can,” and in al-Mukhtasar stattes that, “There is no harm in a polytheist staying in any mosque except in the Inviolable Mosque (Masjid al-Haram of Mecca).”
Some Muslims quote Qur’an 9:17-18 as evidence for the prohibition of non-Muslims entering mosques. The verses read:
“It does not befit those who ascribe divinity to any other than Allah, to maintain the mosques of Allah… The mosques of Allah shall be visited and maintained by only he who believes in Allah and the Last Day, and who is steadfast in his prayers…”
Muhammad Asad notes that prohibiting non-Muslims from entering all mosques based on this verse is not tenable:
“… In view of the fact that in 9 A.H. – that is, after the revelation of this Surah – the Prophet himself lodged a deputation of the polytheist Banu Thaqif in the mosque of Medina (Razi). Thus, the above verse expresses no more than the moral incongruity of the unbelievers ‘visiting or tending God’s houses of worship’.”
Ibn Kathir notes that what is prohibited for non-Muslims to enter is [only] the Masjid al-Haram (the Inviolable Mosque in Mecca). Thus, the majority of Muslim scholars are of the opinion that non-Muslims are not allowed to visit the Sacred Mosque in Mecca based on their interpretation of Qur’an 9:28.
However, many visitors and tourists of various faiths visit the numerous grand mosques across the world in Egypt, Turkey, Oman, Bahrain, and Malaysia, etc. Some Muslims (and Mosque Tour Guides) utilize this rare opportunity to educate the visitors about Islam and clarify common misconceptions they might have about the religion.
Therefore, non-Muslims can, and should be allowed to visit and enter mosques, as long as this does not undermine any Islamic ideal.
 Ibn al-Qayyim, Ahkam Ahl al-Dhimmah, Dar al-Ilm Lilmalayin, Beirut, 1964, p.691, cited by Salim Al- Bahnasawy in Non-Muslims in the Shariah of Islam, Dar an-Nashr lil-Jami’at, Egypt, 2004, p.77
 Al-Qushairi, Muslim bin Hajaj Abul Husain, Sahih Muslim, Darul Jeel, Beirut, vol.4, p.125, hadith no. 3445; Ibn Hibban, Muhammad bin Hibban bin Ahmad, Sahih Ibn Hibban, Edited Shuaib al-Arnaut, Mu’assasat al-Risalah, Beirut, 1993, hadith no. 1625
 Sahih Bukhari, hadith no. 1116; Sahih Muslim, hadith no. 2469; Abu Dawud, hadith no. 880; Tirmidhi, hadith no. 3851; An-Nasa’I, hadith no. 2849; Ibn Majah, hadith no. 1394; Musnad Ahmad, hadith no. 4606; Musannaf ibn Abu Shaibah, hadith no. 207; Source: Al-Maktabah al-Shamilah 3.13
 Imtiaz Ahmad, “Friendship with Non-Muslims” in Speeches for an Inquiring Mind, Al-Rasheed Printers, Medina, 2001, p.57; Mubarakfuri Safy al-Rahman, Al-Raheeq Al-Makhtum (The Sealed Nectar: Biography of the Noble Prophet), Revised Edition, Maktabah Dar al-Salam, Riyadh, 2002, p. 522
 Safy al-Rahman Mubarakfuri, Al-Raheeq Al-Makhtum (The Sealed Nectar: Biography of the Noble Prophet), Revised Edition, Maktabah Dar al-Salam, Riyadh, 2002, p. 523
 Ibn Qayyim, Ahkam Ahl al-Dhimmah, Dar al-Ilm Lilmalayin, Beirut, 1964, p.691, cited by Salim Al-Bahnasawy in Non-Muslims in the Sharia of Islam, Dar an- Nashr lil- Jami’at, Egypt, 2004 p.77
 Ibn Qayyim, Zad al- Ma’ad, vol.3, p.629; cited in Saeed Ismaeel, The Relationship between Muslims and Non-Muslims, Originally published in Toronto, Canada: Al-Attique International Islamic Publishing, 2000, republished in Lagos: Sawtul Haqq, p.59.
Ibn Qayyim, Zad al-Ma’ad, Mu’assasah al-Risalah, Beirut, 1994, vol. 3, p.638. Also cited in Ali Mohiuddin Al-Qaradaghi, We and the Other: Substantiating the basis of the Ideal Relation between Muslims and Non-Muslims in Light of the Islamic Jurisprudence, (Transl. Syed Bashir Ahmad Kashmiri), A.S. Noordeen, Kuala Lumpur, 2015, p.196-197.
 Scholars differ on the credibility of the aspect of prayer in the narration. While some consider it strong, others regard it as weak. For instance, al-Albani considers it weak (in his footnotes to Muhammad Al-Ghazali’s Fiqh-U-Seerah: Understanding the Life of Prophet Muhammad, International Islamic Federation of Student Organisations, Riyadh, 1995, p.430-431).
 E.g. Sahih al-Bukhari, vol.5, hadith no. 658 in Alim 6.0 on “Thumama ibn Uthal”.
 Quoted in Sayyid Sabiq, Fiqh-us-Sunnah, vol.2, no.73a in Alim 6.0
 Muhammad Asad, The Message of the Qur’an, The Book Foundation, England, 2003, p.292, n.27. This incongruity of one who does not believe in worshipping Allah maintaining the place where Allah is worshipped is also mentioned by Abu Ja’far. (See Tafsir al-Qurtubi, Dar Ihya at-Turath al-Arab, Beirut, 1985, vol. 8, p.89).
 Tafsir Ibn Kathir (Abridged), Darussalam Publishers, Riyadh, vol.4, p.388
 Ibn Ashur, Al-Tahrir wal-Tanwir; Alusi, Ruh al-Ma’ani; Nasafi, Madarik al-Tanzil; Abu Su’ud, Irshad al-Aql al-Salim; Abu Hayyan, Bahr al-Muhit; Suyuti, Tafsir Jalalayn under commentary of Qur’an 9:28 in Al-Maktabah al-Shamilah, 2nd Edition, 2007. According to scholars from the Hanafi School of Law (madhhab) however, “There is nothing wrong with non-Muslims (dhimmis) entering the Haram of Makka (al-Masjid al-Haram) and all other Mosques. This is the sound opinion in the Madhhab, as mentioned in al-Muhit of Sarakhsi.” (Al-Shaikh Nisam and a group of Indian Scholars al-Fatawa al-Hindiyya, vol. 5, p.346). See also Ibn Kathir, Tafsir al-Qur’an al-Azim, (ed. Mahmud Hassan), Dar Fikr, Beirut, 1994, vol. 2, p.422.