Language:
كتاب الأذان
10  
Call to Prayers (Adhaan)
(94)
Chapter: Is it permissible to one to look around in Salat (prayer) if something happens to one? Or can one look at something like expectoration in the directn of the Qiblah?
(94)
باب هَلْ يَلْتَفِتُ لأَمْرٍ يَنْزِلُ بِهِ أَوْ يَرَى شَيْئًا أَوْ بُصَاقًا فِي الْقِبْلَةِ
Sahih al-Bukhari 753

Narrated Ibn `Umar:

The Prophet (ﷺ) saw expectoration in the direction of the Qibla of the mosque while he was leading the prayer, and scratched it off. After finishing the prayer, he said, "Whenever any of you is in prayer he should know that Allah is in front of him. So none should spit in front of him in the prayer."

حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، قَالَ حَدَّثَنَا لَيْثٌ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّهُ قَالَ رَأَى النَّبِيُّ صلى الله عليه وسلم نُخَامَةً فِي قِبْلَةِ الْمَسْجِدِ، وَهْوَ يُصَلِّي بَيْنَ يَدَىِ النَّاسِ، فَحَتَّهَا ثُمَّ قَالَ حِينَ انْصَرَفَ ‏ "‏ إِنَّ أَحَدَكُمْ إِذَا كَانَ فِي الصَّلاَةِ فَإِنَّ اللَّهَ قِبَلَ وَجْهِهِ، فَلاَ يَتَنَخَّمَنَّ أَحَدٌ قِبَلَ وَجْهِهِ فِي الصَّلاَةِ ‏"‏‏.‏ رَوَاهُ مُوسَى بْنُ عُقْبَةَ وَابْنُ أَبِي رَوَّادٍ عَنْ نَافِعٍ‏.‏
Reference : Sahih al-Bukhari 753
In-book reference : Book 10, Hadith 147
USC-MSA web (English) reference : Vol. 1, Book 12, Hadith 720
  (deprecated numbering scheme)