in our brothers’ mosque, and Abu ʿĀmir will pray there when he returns from Syria (1).
So they went to the Messenger of Allah ﷺ while he was preparing for the expedition to Tabūk and said, “O Messenger of Allah, we have built a mosque for those in need, for the sick, and for nights of heavy rain. We would like you to pray in it for us and invoke blessing.” Their only purpose was to use his prayer as proof of his endorsement and thus secure its legitimacy, but Allah protected him from praying there. The Prophet ﷺ replied, “I am setting out on a journey and am pre-occupied; when we come back, we shall visit you and pray there, God willing.”
When he returned from Tabūk they approached him again. By then they had finished the building and had already prayed in it on Friday, Saturday, and Sunday. He called for his cloak so that he could put it on and go to them, but the Qur’an was revealed to him concerning Masjid al-Dirār. The Prophet ﷺ thereupon summoned a group of Companions and said, “Go to that mosque whose people have wronged themselves; demolish it and burn it.” They hurried off, burned the mosque, and tore it down.
The verse therefore proves that it is unlawful to pray in Masjid al-Dirār or in any mosque that shares its characteristics. This is the position of the Mālikīs and others. Ibn Ḥazm stated explicitly in al-Muḥallā, citing Allah’s words, “Do not ever stand in it (to pray)” (Q 9:108): “It is thus established that it is not a place for prayer.”