Of the Most Unjust are Those Who prevent People from the Masjids and strive for their Ruin

The Quraysh idolators are those who hindered the people from the Masjids of Allah and wanted to destroy them. Ibn Jarir reported that Ibn Zayd said that Allah's statement,

﴿وَمَنْ أَظْلَمُ مِمَّن مَّنَعَ مَسَـجِدَ اللَّهِ أَن يُذْكَرَ فِيهَا اسْمُهُ وَسَعَى فِى خَرَابِهَآ﴾

(And who are more unjust than those who forbid that Allah's Name be mentioned (i.e. prayers and invocations) in Allah's Masjids and strive for their ruin) is about the Quraysh idolators who prevented the Prophet from entering Makkah from Al-Hudaybiyyah, until he slaughtered the Hadi (animal for sacrifice) at Dhi-Tuwa. He then agreed to a peace treaty with the idolators and said to them, (No one before has ever prevented people from entering the House. One would even see the killer of his father and brother, but would not prevent him (from entering the House of Allah).) They said, "Whoever killed our fathers at Badr, shall never enter it while there is one of us alive.'' Allah's statement,

﴿وَسَعَى فِى خَرَابِهَآ﴾

(and strive for their ruin) means those who prevent whoever maintain the Masjids with Allah's remembrance and who visit Allah's House to perform Hajj and `Umrah. Ibn Abi Hatim recorded that Ibn `Abbas said that the Quraysh prevented the Prophet from praying at the Ka`bah in Al-Masjid Al-Haram, so Allah revealed,

﴿وَمَنْ أَظْلَمُ مِمَّن مَّنَعَ مَسَـجِدَ اللَّهِ أَن يُذْكَرَ فِيهَا اسْمُهُ﴾

(And who are more unjust than those who forbid that Allah's Name be mentioned (i.e. prayers and invocations) in Allah's Masjids)''

After Allah chastised the Jews and Christians, He also criticized the idolators who expelled the Messenger of Allah and his Companions from Makkah, preventing them from praying in Al-Masjid Al-Haram, which they kept exclusively for their idols and polytheism. Allah said,

﴿وَمَا لَهُمْ أَلاَّ يُعَذِّبَهُمُ اللَّهُ وَهُمْ يَصُدُّونَ عَنِ الْمَسْجِدِ الْحَرَامِ وَمَا كَانُواْ أَوْلِيَآءَهُ إِنْ أَوْلِيَآؤُهُ إِلاَّ الْمُتَّقُونَ وَلَـكِنَّ أَكْثَرَهُمْ لاَ يَعْلَمُونَ ﴾

(And why should not Allah punish them while they hinder (men) from Al-Masjid Al-Haram, and they are not its guardians None can be its guardians except Al-Muttaqun (the pious), but most of them know not.) (8:34)

﴿مَا كَانَ لِلْمُشْرِكِينَ أَن يَعْمُرُواْ مَسَاجِدَ الله شَـهِدِينَ عَلَى أَنفُسِهِم بِالْكُفْرِ أُوْلَـئِكَ حَبِطَتْ أَعْمَـلُهُمْ وَفِى النَّارِ هُمْ خَـلِدُونَ - إِنَّمَا يَعْمُرُ مَسَـجِدَ اللَّهِ مَنْ ءَامَنَ بِاللَّهِ وَالْيَوْمِ الاٌّخِرِ وَأَقَامَ الصَّلَوةَ وَءاتَى الزَّكَوةَ وَلَمْ يَخْشَ إِلاَّ اللَّهَ فَعَسَى أُوْلَـئِكَ أَن يَكُونُواْ مِنَ الْمُهْتَدِينَ ﴾

(It is not for the Mushrikin (polytheists), to maintain the Masjids of Allah while they witness against their own selves of disbelief. The works of such are in vain and in Fire shall they abide. The Masjids of Allah shall be maintained only by those who believe in Allah and the Last Day; perform the Salah, and give the Zakah and fear none but Allah. It is they who are on true guidance.) (9:17-18)

and,

﴿هُمُ الَّذِينَ كَفَرُواْ وَصَدُّوكُمْ عَنِ الْمَسْجِدِ الْحَرَامِ وَالْهَدْىَ مَعْكُوفاً أَن يَبْلُغَ مَحِلَّهُ وَلَوْلاَ رِجَالٌ مُّؤْمِنُونَ وَنِسَآءٌ مُّؤْمِنَـتٌ لَّمْ تَعْلَمُوهُمْ أَن تَطَئُوهُمْ فَتُصِيبَكمْ مِّنْهُمْ مَّعَرَّةٌ بِغَيْرِ عِلْمٍ لِّيُدْخِلَ اللَّهُ فِى رَحْمَتِهِ مَن يَشَآءُ لَوْ تَزَيَّلُواْ لَعَذَّبْنَا الَّذِينَ كَفَرُواْ مِنْهُمْ عَذَاباً أَلِيماً ﴾

(They are the ones who disbelieved and hindered you from Al-Masjid-Al-Haram (at Makkah) and detained the sacrificial animals, from reaching their place of sacrifice. Had there not been believing men and believing women whom you did not know, that you may kill them and on whose account a sin would have been committed by you without (your) knowledge, that Allah might bring into His mercy whom He wills ـ if they (the believers and the disbelievers) had been apart, We verily, would have punished those of them who disbelieved with painful torment) (48:25). Therefore, Allah said here,

﴿إِنَّمَا يَعْمُرُ مَسَـجِدَ اللَّهِ مَنْ ءَامَنَ بِاللَّهِ وَالْيَوْمِ الاٌّخِرِ وَأَقَامَ الصَّلَوةَ وَءاتَى الزَّكَوةَ وَلَمْ يَخْشَ إِلاَّ اللَّهَ﴾

(The Masjids of Allah shall be maintained only by those who believe in Allah and the Last Day; perform the Salah, and give the Zakah and fear none but Allah). Therefore, if those believers who follow the virtues mentioned in the Ayah were prevented from attending the Masjid, then what cause for destruction is worse than this Maintaining the Masjids not only means beautifying them, but it involves remembering Allah, establishing His Shari`ah in the Masjids and purifying them from the filth of Shirk.