The call to prayer was made for the prayer, meaning the dawn prayer, and the Messenger of Allah ﷺ began to pray while glancing toward the mountain pass.
ثوب بالصلاة-يعني صلاة الصبح، فجعل رسول الله ﷺ يصلي، وهو يلتفت إلى الشعب.
Abu Dawud (916) narrated it from Rabi bin Nafi, who said, Muawiya, meaning Ibn Salam, narrated to us, from Zayd, that he heard Abu Salam say, Saluli, who is Abu Kabsha, narrated to me, from Sahl bin Hanzaliyya, and he related it. Abu Salam said, Saluli, who is Abu Kabsha, narrated to me, from Sahl bin Hanzaliyya, and he related it. Its chain is sahih, and Ibn Khuzayma (487) and Hakim (1/237) graded it sahih, and both narrated it through this route in abridged form. Abu Dawud also narrated it in the Book of Jihad (2501) from Abu Tuba, who said, Muawiya narrated it to us, in full length, and it will be repeated in the Book of Jihad. Abu Dawud said, He had sent a horseman to the mountain pass at night to keep watch.Baghawi said in his commentary (3/254), Turning one's head during prayer is disliked, but if it is for something that arises, there is no harm in it, then he mentioned the hadith of Sahl bin Hanzaliyya. It has been established in the hadith of Sahl bin Saad Saadi that Abu Bakr turned and saw the Messenger of Allah ﷺ, and the Messenger of Allah ﷺ gestured to him to stay in his place. This is found in Sahihayn, and its sourcing was given earlier in the chapter on congregational prayer, on giving precedence to the congregation when the imam is delayed.As for looking at something, there is no harm in it, though it is best that one's gaze be directed toward the place of prostration. As for what is reported from Anas that the Prophet said, "Anas, keep your gaze where you prostrate," it is daif, indeed fabricated. Bayhaqi (2/284) narrated it through the route of Ulayla bin Badr, who said, Antawana narrated to us, from Hasan, from Anas, and he related it.Aqeeli said in Duafa (1468), in the entry on Antawana, He is unknown in transmission, his hadith is not preserved, Rabi bin Badr narrated from him, and Rabi is discarded. This is how he stated it, "Rabi bin Badr." Dhahabi mentioned him in Mizan (3/303) and said, It is not known who this is, but Ulayla bin Badr alone transmitted it from him, and he is weak. What appears to be the case is that his name is Rabi bin Badr, and Ulayla is his nickname, as stated in the History of Khatib (8/415), where Nasai said of him, He is discarded. See Mizan (2/38). Hafiz said in Lisan Mizan (4/385), Rabi is the same as Ulayla, in the diminutive form.Bayhaqi said, We have narrated from Mujahid and Qatada that they both disliked closing the eyes during prayer, and a connected hadith has been narrated on this matter, but it amounts to nothing. End of quote.Among the hadiths on this subject is that turning one's head during prayer does not invalidate the prayer, so long as one's entire body does not turn away from the qibla. As for what is reported from Anas bin Malik, who said, The Messenger of Allah ﷺ said to me, "My son, beware of turning your head during prayer, for turning the head during prayer is destruction, and if it must happen, let it be in voluntary prayer, not in obligatory prayer," this is daif.Tirmidhi (589) narrated it from Abu Hatim Muslim bin Hatim Basri, who said, Muhammad bin Abdullah Ansari narrated to us, from his father, from Ali bin Zayd, from Saeed bin Musayab, who said, Anas said, and he related it. Tirmidhi said, "Hasan gharib," and Zaylai quoted from him, "Hasan sahih." The correct view is that it is daif, for Ali bin Zayd, known as Ibn Jadan, is daif. Nasai and Juzjani declared him daif, and Ahmad, Abu Zura, Abu Hatim, Uthman Darimi, and others criticized him.