Who cannot build the mosques of Allaah
It is not for the polytheists to maintain the mosques of Allah [while] witnessing against themselves with disbelief. [For] those, their deeds have become worthless, and in the Fire they will abide eternally.
[Qur'aan 9:17]
Imaam al-Tabari writes:
يقول تعالى ذكره: ما ينبغي للمشركين أن يعمروا مساجد الله وهم شاهدون على أنفسهم بالكفر. يقول: إن المساجد إنما تعمر لعبادة الله فيها، لا للكفر به, فمن كان بالله كافرًا، فليس من شأنه أن يعمُرَ مساجد الله
It is not befitting that the mosques of Allaah be built by the polytheists while they are witness over themselves for their disbelief. The mosques are only built for the purpose of worshipping Allaah in them and not for disbelief in them. And so the one who is a disbeliever in Allaah, then it is not from the matters which concern him to build the mosques of Allaah.