"[Indeed, those who have disbelieved and avert [people] from the way of God and [from] al-Masjid al-Haram]" – that is: and they avert [people] from al-Masjid al-Haram. "[which We have made for the people]" – [as a qibla] – "[equal are the resident therein]" – meaning: the people of Mecca – "[and the visitor]" – meaning: whoever comes to it from the rest of the people for Hajj and 'Umrah. He says: They are equal in its sanctuary, its dwellings, and its rights.
Muhammad said: "[Equal]" – the reading therein is in the nominative case (raf'), based on it being an initial subject (mubtada'). "[And [for] whoever intends [a deed] therein of deviation [or] wrongdoing]" – that is: by polytheism. Al-ilhad (deviation) means: inclining. The meaning is: And whoever intends to worship other than God therein.
Muhammad said: "[of deviation]" – the letter ba in it is extra (za'ida).