Hadith 33968

Chapter 11

باب 11

(11) باب لاَ تُسْتَقْبَلُ الْقِبْلَةُ بِغَائِطٍ أَوْ بَوْلٍ إِلاَّ عِنْدَ الْبِنَاءِ جِدَارٍ أَوْ نَحْوِهِ

(11) Chapter: While urinating or defecating, never face the Qiblah except when you are screened by a building or a wall or something like that
10
حَدَّثَنَا آدَمُ، قَالَ حَدَّثَنَا ابْنُ أَبِي ذِئْبٍ، قَالَ حَدَّثَنَا الزُّهْرِيُّ، عَنْ عَطَاءِ بْنِ يَزِيدَ اللَّيْثِيِّ، عَنْ أَبِي أَيُّوبَ الأَنْصَارِيِّ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " إِذَا أَتَى أَحَدُكُمُ الْغَائِطَ فَلاَ يَسْتَقْبِلِ الْقِبْلَةَ وَلاَ يُوَلِّهَا ظَهْرَهُ، شَرِّقُوا أَوْ غَرِّبُوا ".

Narrated Abu Aiyub Al-Ansari:
Allah's Messenger (ﷺ) said, "If anyone of you goes to an open space for answering the call of nature he should neither face nor turn his back towards the Qibla; he should either face the east or the west."

Reference: Sahih al-Bukhari 144

In-book reference: Book 4, Hadith 10

USC-MSA web (English) reference(deprecated numbering scheme): Vol. 1, Book 4, Hadith 146