The demolition or burning of Masjid al-Dirar (Arabic: مسجد الضرار), also referred to as the Mosque of Opposition or the Mosque of Dissent is mentioned in the Qur'an. Masjid al-Dirar was a Medinian mosque that was erected close to the Quba' Mosque and which the Islamic Prophet Muhammad initially approved of but subsequently had destroyed while he was returning from the Expedition to Tabouk (which occurred in October 630 AD). In the main account narrated by the majority of scholars, the mosque was built by twelve disaffected men from the Ansar on the commands of Abu 'Amir al-Rahib; a Christian monk who refused Muhammad's invitation to Islam and instead fought along with the Meccan non-Muslims against Islam in the Battle of Uhud. Abu 'Amir reportedly urged his men to establish a stronghold and prepare whatever they can of power and weapons as he promised and insinuated to them that he will lead an army, backed by Heraclius, to fight Muhammad and his companions, and defeat his message by expelling him from Medina.Ahmad ibn Yahya al-Baladhuri also relates that the men, who built the Al-Dirar mosque "for mischief and for infidelity and to disunite the Believers" refused to pray in Masjid al-Quba claiming that it was built in a place where a donkey used to be tied up.
Muhammad prepared himself to go to the Mosque, before he was prevented by a revelation about the hypocrisy and ill design of the builders of the Mosque
Muhammad and his companions believed they were Hypocrites (munafiqs) and had ulterior motives for building the Al-Dirar mosque. Thus he ordered his men to burn it down.
According to the Islamic tradition, Muhammad was asked to lead prayer there but received a revelation (mentioned in the Qur'anic verses 9:107 and 9:110) in consequence of which the mosque was destroyed by fire. Hencerforth, it was known as the Mosque of Opposition.