9:17
مَا كَانَ لِلْمُشْرِكِينَ أَن يَعْمُرُوا۟ مَسَٰجِدَ ٱللَّهِ شَٰهِدِينَ عَلَىٰٓ أَنفُسِهِم بِٱلْكُفْرِ ۚ أُو۟لَٰٓئِكَ حَبِطَتْ أَعْمَٰلُهُمْ وَفِى ٱلنَّارِ هُمْ خَٰلِدُونَ
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.
Translation · Saheeh International
Tafsir
Ibn Kathīr (abridged)
It is not for Idolators to maintain the Masjids of Allah
Allah says that it is not fitting that those who associate others with Allah in worship should maintain the Masjids of Allah that were built in His Name alone without partners. Those who read the Ayah, "Masjid Allah", said that it refers to Al-Masjid Al-Haram, the most honored Masjid on the earth, which was built, from the first day, for the purpose of worshipping Allah alone without partners. It was built by Khalil Ar-Rahman (the Prophet Ibrahim) peace be upon him. The idolators do this while they themselves testify to their disbelief with their statements and actions. As-Suddi said, "If you ask a Christian, `What is your religion', He will tell you he is a Christian. If you ask a Jew about his religion, he will say he is a Jew, and the same for a Sabi' and a Mushrik!"'
أُوْلَـئِكَ حَبِطَتْ أَعْمَـلُهُمْ
(The works of such are in vain), because of their Shirk,
وَفِى النَّارِ هُمْ خَـلِدُونَ
(and in Fire shall they abide.) Allah said in another Ayah,