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:
The mosque can serve as a hospital in case of necessity. It happened in the time of the Prophet (peace and blessings be upon him) when the Muslim army came back from the Battle of Uhud: the wounded were treated in the mosque. However, after this exceptional situation ends, the mosque should be cleaned.
In his response to your question, the prominent Muslim scholar Sheikh Muhammad Iqbal Nadvi, Director and imam of Al-Falah Islamic Center, Oakville, Ontario, Canada, states:
The mosque is not restricted to being a place for performing Islamic rituals, as it also plays an important social and political role.
Your question has many sides:
1. If the mosque is built in a way that it can be used as a place of worship and offer other services and there are other rooms available, then it can be used as a hospital as it is used for educational purpose, but not in the Prayer hall.
2. If it is not established in that way and these facilities are not available, and on the other hand, the demand is huge, then under the law of darurah (necessity) in Islam, it can be used as an exception. This applies to cases like disasters when people have no place to go except the mosque.
In the time of the Messenger of Allah (peace and blessings be upon him) there was a lady named Umm Ash-Shifa’ who set up a tent in the courtyard of the mosque and used to treat the wounded and the sick people. It was also reported that Sa`d ibn Mu`adh was among the people that benefited from this service.
As for the impurity, it can be cleaned and removed so that it does not turn the mosque, which is supposed to be used for Prayer, dirty.
As for the case of non-Muslims, there is no wrong in providing this service for them, because to save a life is an obligation in Islam, whether the person is a Muslim or not.
Almighty Allah knows best.
Editor’s note: This fatwa is from Ask the Scholar’s archive and was originally published at an earlier date.