مَا كَانَ لِلْمُشْرِكِينَ أَن يَعْمُرُوا۟ مَسَٰجِدَ ٱللَّهِ شَٰهِدِينَ عَلَىٰٓ أَنفُسِهِم بِٱلْكُفْرِ ۚ أُو۟لَٰٓئِكَ حَبِطَتْ أَعْمَٰلُهُمْ وَفِى ٱلنَّارِ هُمْ خَٰلِدُونَ
Commentary:
This verse relates to idolatrous pilgrims and serves as an introduction to the announcement contained in 9:28 below. No idolater was henceforth to be allowed to approach the Ka‘bah, as announced by ‘Ali to the pilgrims assembled at Mecca on the occasion of the Greater Pilgrimage of the year 9 AH (see note on 9:3 above). The verse under comment gives the reason for that prohibition. The Ka‘bah being a temple dedicated to the worship of the One God, idolaters had nothing to do with it. They were declared enemies of God’s Unity who bore witness to their own idolatrous beliefs and thus stood condemned by their own confession. Moreover, while performing the Pilgrimage, idolaters, instead of declaring God’s Oneness, attributed co-partners to Him, for it is on record that, while reciting the prescribed formula: "Here I am, O my Lord, here I am; Thou hast no co-partner" they used to add the words "except him whom Thou hast Thyself made Thy co-partner." The words, while they bear witness against themselves to disbelief, beside being general in their significance, may also refer to this practice of idolaters.
The verse relates to idolatrous pilgrims and serves as an introduction to the announcement contained in 9:28 below. No idolater was, henceforth, to be allowed to approach the Ka‘bah, as announced by ‘Ali to the pilgrims assembled at Mecca on the occasion of the Greater Pilgrimage in the year 9 A.H. The verse gives the reason for that prohibition. The Ka‘bah being the Temple dedicated to the worship of the One God, idolaters had nothing to do with it. They were declared enemies of God’s Unity and stood condemned by their own confession.