إِذَا أَتَيْتُمُ الْغَائِطَ فَلَا تَسْتَقْبِلُوا الْقِبْلَةَ وَلَا تَسْتَدْبِرُوهَا، وَلَكِنْ شَرِّقُوا أَوْ غَرِّبُوا
“When you go to relieve yourselves, do not face the Qibla and do not turn your back to it, but turn towards the east or the west.”
Benefits:
Medina lies to the south of Makkah. Therefore the permission to face east or west is specific to that region. Since the Qibla is to the west in our land, we must face north or south. In the above hadith, the Messenger of Allah ﷺ forbade, in absolute terms, facing the Qibla or turning one’s back to it when relieving oneself. Therefore, whether in a settlement or in the desert, one should not face the Qibla or turn one’s back to it when relieving oneself. Accordingly, the narrator of the hadith, Abu Ayyub al-Ansari (may Allah be pleased with him), relates that when we came to the region of Sham, we saw toilets built facing the Kaaba, so out of respect for the Kaaba we would try to turn to the other side and seek forgiveness from Allah. Sahih al-Bukhari, previous reference?
This means that as far as possible, they would try to turn their direction to the other side, and along with that they would also ask Allah for forgiveness, saying that as much as we were able, we tried to deviate from the Kaaba when relieving ourselves; what was not in our control, we ask Allah’s forgiveness for it. Although an action of the Messenger of Allah ﷺ is presented in this regard, that he was facing Sham with his back to the Kaaba while relieving himself.
From this it appears that this restriction is not necessary in settlements or buildings. However, the sanctity and reverence of the House of Allah demand that one not face the Qibla or turn one’s back to it when relieving oneself, in absolute terms. Moreover, no action of the Messenger of Allah ﷺ ever contradicts a specific command he gave to the Ummah. والله اعلم