Hadith 51

Sahih Bukhari

Book 8: Prayers (Salat)

Chapter 31

[During the obligatory Salat (prayers)] one should face the Qiblah (Kabah at Makkah) wherever one may be

باب التَّوَجُّهِ نَحْوَ الْقِبْلَةِ حَيْثُ كَانَ

Narrated Abu Hurairah رضي الله عنه: The Prophet said, "Face the Qiblah (Ka'bah at Makkah) and say Allahu Akbar."
وَقَالَ أَبُو هُرَيْرَةَ قَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «اسْتَقْبِلِ الْقِبْلَةَ وَكَبِّرْ».
Sahih al-Bukhari 400
حَدَّثَنَا مُسْلِمٌ، قَالَ حَدَّثَنَا هِشَامٌ، قَالَ حَدَّثَنَا يَحْيَى بْنُ أَبِي كَثِيرٍ، عَنْ مُحَمَّدِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ جَابِرٍ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُصَلِّي عَلَى رَاحِلَتِهِ حَيْثُ تَوَجَّهَتْ، فَإِذَا أَرَادَ الْفَرِيضَةَ نَزَلَ فَاسْتَقْبَلَ الْقِبْلَةَ‏.‏
Jabir:

Allah's Messenger (ﷺ) used to pray (optional, non-obligatory prayer) while riding on his mount (Rahila) wherever it turned, and whenever he wanted to pray the compulsory prayer he dismounted and prayed facing the Qibla.