Demolition of Masjid al-Dirar
The demolition or burning of Masjid al-Dirar  (), 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 CE). In the main account narrated by the majority of scholars, the mosque was built by 12 hypocrites (munafiqeen) on the commands of Abu 'Amir al-Rahib; a Hanif 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 Quba Mosque 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

Upon learning that these men were hypocrites (munafiqeen) and had ulterior motives for building the Al-Dirar mosque, 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. Henceforth, it was known as the Mosque of Opposition. Accounts
Abu Amir ar- Rahib was a Hanif. He disliked Muhammad, and reportedly fought in the Battle of Badr. He wanted him expelled from Medina and Islam eradicated. He also joined the Quraysh against the Muslim in the Battle of Uhud. The Majority have said that Abu Amir asked the ruler of the Byzantine for help against Muhammad. The hypocrite and enemy of Islam, Abd-Allah ibn Ubayy, was his nephew. Abu Amir died in 9AH or 10AH of the Islamic calendar in the court yard of Heraclius. Ibn Kathir mentions in his Tafsir that Abu 'Amir Ar-Rahib (a Christian monk) told some disaffected Muslim Ansar to build the mosque. Abu Amir is reported to have said to some people that he will go to the emperor (Caesar) of the Byzantine Empire and return with Roman soldiers, to expel Muhammad. According to Ar-Rahīq al-Makhtum (the Sealed Nectar), a modern Islamic biography of Muhammad written by the Indian Muslim author Saif ur-Rahman Mubarakpuri, a mosque called Masjid-e-Darar (the mosque of harm) was created by the Munafiq (hypocrites). When the mosque was completely built, the creators approached Muhammad and asked him to pray in it. But Muhammad put the request on hold till his return from the Battle of Tabuk. Through a "Divine Revelation", Muhammad was told that the Mosque was promoting anti-Islamic elements. Thus, on Muhammad's return from Tabuk, he sent a party of Muslim fighters to demolish the mosque. Ahmad ibn Yahya al-Baladhuri also mentioned this. He said the Mosque was built by some men who refused to pray in Masjid al-Quba because it was built in a place where a donkey was tied up. Rather they said they will build another mosque until Abu Amir could lead the service in it. But Abu Amir did not convert to Islam, rather he left Medina and converted to Christianity. The Banu Amir ibn Awf built Masjid al-Quba and Muhammad led the prayer in it, but their brother tribe, the Banu Ghan ibn Auf were jealous and also wanted Muhammad to pray in the Mosque, they also said that: "Abu Amir may pass here on his way from Syria, and lead us in prayer" 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

Burning of Masjid al-Dirar

Details of the burning
When Muhammad was returning from Tabuk, the Muslims halted at Dhu Awan. Some Muslims constructed the mosque claiming it was for the sick and needy, but because of Muhammad's belief that it was an opposition mosque, he sent Muslim fighters to burn it down. The men entered the mosque and set fire to it with its people inside, "and the people ran away from it". Analysis and speculation about the burning
Isma'il Qurban Husayn (translator of Tabari, Volume 9, Last years of the prophet) speculated by saying in footnote 426, that the people were "probably" linked to those who wanted to kill Muhammad in the Battle of Tabuk, but Tabari himself did not make that claim. William Muir mentions that Muhammad believed the Mosque was built to create disunity among Muslims by drawing people away from another Mosque in Quba i.e. Masjid al-Quba, which was the first Mosque to be built by Muslims. Muhammad ibn Abd al-Wahhab at-Tamimi mentioned in an abridged version of Ibn Qayyim Al-Jawziyya's biography of Muhammad (named Zad al-Ma'ad), that the people of the city watched as the mosque was burnt down, and he also used this event to provide teachings to justify his belief that burning down people of sin is permissible in Islam. Islamic sources

Primary sources
The event is mentioned in the Quran verse 9:107, the verse states:

The Muslim scholar Ibn Kathir's commentary on this verse is as follows:

The event is mentioned by the Muslim jurist Tabari as follows:

Secondary sources
Muhammad ibn Abd al-Wahhab at-Tamimi (founder of the Wahhabi movement) mentioned the following in an abridged version of Ibn Qayyim Al-Jawziyya's biography of Muhammad (named Zad al-Ma'ad), about this event:

See also
 Mosque

References

630 disestablishments
7th-century conflicts
Life of Muhammad
Mosques in Medina
7th-century mosques