Answered by: Maulana Shadman Ahmed
Some students, out of fear, pray in the bathroom in school, work, or university. Is this permissible?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيْم
In the name of Allah, the Most Gracious, the Most Merciful
One of the conditions or sharā’it of Salāh is praying in a place that is free from all impurities such as urine or feces. Public bathrooms have impurities such as urine and feces and therefore are not permissible for prayer. Students should try to find another place to pray such as a classroom or a hall. This can be done by speaking to a teacher or dean to reserve a room for prayer. Most of the time schools, universities, and workplaces are happy to comply to find a room dedicated to prayer. Some individuals may feel shy, instead of fear, in which case it’s important to understand that one should not shy from Islam. Prayer and other aspects of Islam should make us grateful to be given this gift of Iman.
If a person is completely unable to pray anywhere due to harsh fear that they will be physically assaulted, then they should move away from that land to a land that they will be able to worship Allah SWT freely. Allah SWT reminds us in Sūrah Ale-‘Imrān verse 97, “The angels ask those they take while they are wronging themselves, ´What were your circumstances?´ They reply, ´We were oppressed on earth.´ They say, ´Was Allah’s earth not wide enough for you to have made hijra elsewhere in it?´ The shelter of such people will be Hell. What an evil destination!”
Only Allah knows best
Written by Maulana Shadman Ahmed
Checked and approved by Mufti Mohammed Tosir Miah
Darul Ifta Birmingham
 al-Fatāwā al-Ḥindiyyah. Vol. 1. Pg.58. Dār al-Fikr, 1310H.
al-Kāsānī, ’Alā al-Dīn Abū Bakr b. Mas’ūd. Badāi’ al-Ṣanāi’ fī Tartīb al-Sharāi’. Vol.1. Pg. 114-115. Dār al-Kutub al-’Ilmmiyyah, 567H.