He—may Allah have mercy on him—was asked:
Is it permissible to pray in churches and synagogues when images are present, or not? May they be called houses of Allah, or not?
He answered:
They are not houses of Allah; rather, the houses of Allah are the mosques. They are instead houses in which Allah is disbelieved in, even though He may also be remembered there. Buildings have the same status as their occupants, and their occupants are disbelievers; thus, they are the disbelievers’ houses of worship.
As for praying in them, scholars within Ahmad’s school and other schools hold three views:
The first is unconditional prohibition, which is Mālik’s view. The second is unconditional permission, which is the view of some scholars of Ahmad’s school.
The third—which is the correct view, transmitted from ʿUmar ibn al-Khattāb and others, and expressly stated by Ahmad and others—is that if images are present, one should not pray there. This is because the angels do not enter a house containing an image, and because the Prophet, may Allah bless him and grant him peace, did not enter the Kaaba until the images inside it had been effaced. Likewise, ʿUmar said: “We used not to enter their churches while images were in them.”
Such a place is comparable to a mosque built over a grave, for the two Sahīh collections report that mention was made