Wa`alaykumas-salaamu warahmatullahi wabarakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- Islam is the religion of easiness.
2- A Muslim is allowed to perform prayer in a church if he is forced to pray there.
3- If a Muslim prays in a church without necessity his prayer is valid but still it is reprehensible or makruh.
4- Whenever the necessity warrants a Muslim to perform prayer in a church, he should obtain the prior permission of the church authorities as Islam respects other people’s places of worship.
The Prophet (peace and blessings be upon him) is reported to have said: “I have been given five things that no one has been given before me… (Among them is that) the earth has been made for me as a Mosque and a source of purification. So if any man from my nation realizes that he has to pray, then he may pray.” (Al-Bukhari)
It is clear from the aforementioned Prophetic hadith that the whole earth is considered as a mosque for Muslims and a place for performing Salah and prostration.
However, it is better for one to stay away from those places (such as a church or a synagogue) out of fear of doubtful matters. If one finds it extremely difficult to find a place to perform prayer except for a church or a synagogue, and he performs salah in them then one’s prayer is valid as the whole earth is for Allah and all of it is considered a mosque (i.e., meaning a place to perform prayer and to prostrate) for all Muslims. It is reported that `Umar Ibn Al-Khattab (may Allah be pleased with him) refused to pray inside the church and he prayed outside it in order to ward off any false notions that may occur to the minds of ordinary Muslims who may be enticed to pray at the exact place where `Umar performed prayer (i.e., inside the church).
Answering the question, Dr. `Abdul-Fattah Idrees, professor of Comparative Jurisprudence at Al-Azhar University states:
A traveling Muslim may be allowed to perform prayer in a church if he failed to recognize a nearby mosque on his way. It is not necessary that a Muslim who does not know the mosque to perform prayer in a church as there are many other places to perform prayer.
The reason why it is not recommended for a Muslim to pray in a church is that a Muslim praying there may be distracted during performing prayer by the crosses, statues as well other Christian symbols drawn on the wall of the church.
Dr. Muzzamil Siddiqi, the former president of the Fiqh Council of North America (FCNA), concludes:
It is permissible to pray in any place, as long the place is clean (tahir). However, praying in a church, temple or any other religious place without any necessity is makruh.
It is possible that some people of those religions may not like to see us praying in their places of worship and we should not hurt other people’s feelings. If we have to pray in those places then we should take proper permission from the authorities that govern those sanctuaries.
Allah Almighty knows best.