you to come over and honor me.’ ʿUmar replied, ‘We do not enter your churches because of the images they contain’—meaning the statues.” [End of citation from Fath al-Bārī]
Al-Nawawī then related that some scholars granted a concession allowing prayer in a church or synagogue. That concession most likely applies only when the building is free of pictures and statues, as the report from Ibn ʿAbbās indicates; taken without qualification, it is far from correct. The angels, as authentically reported from the Prophet ﷺ, do not enter a house that contains an image, and the Prophet ﷺ himself did not enter the Kaʿbah until he had erased the pictures inside it. A church containing images therefore stands on the same footing as a mosque built over a grave, as Shaykh al-Islām states in his Fatāwā while commenting on the aforementioned hadith: “Whenever a righteous man was among them and died, they would build a mosque over his grave and fashion those very images in it.” The Companions did pray in a church, and Allah knows best. He adds in al-Ikhtiyārāt:
“The position held by the vast majority of our colleagues is that it is disliked to enter a church that contains images; praying there—or in any place where images are present—is even more strongly disliked. This is the sound view, about which there is no doubt whatsoever.”
The sixth location: usurped land, for remaining there is forbidden outside of prayer, and therefore even more so during prayer. Allah the Exalted says, “O you who believe, do not enter houses other than your own until you have sought permission and greeted their inhabitants…” (Q 24:27-28).