Hadith 3

Sunan an-Nasa'i

Book 9: The Book of the Qiblah Sahih

Chapter 2

Situation in which it is permissible to face a direction other than the Qibla

باب الْحَالِ الَّتِي يَجُوزُ عَلَيْهَا اسْتِقْبَالُ غَيْرِ الْقِبْلَةِ

Sahih
Sunan an-Nasa'i 744
أَخْبَرَنَا عِيسَى بْنُ حَمَّادٍ، قَالَ حَدَّثَنَا ابْنُ وَهْبٍ، قَالَ أَخْبَرَنِي يُونُسُ، عَنِ ابْنِ شِهَابٍ، عَنْ سَالِمٍ، عَنْ عَبْدِ اللَّهِ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُصَلِّي عَلَى الرَّاحِلَةِ قِبَلَ أَىِّ وَجْهٍ تَوَجَّهُ بِهِ وَيُوتِرُ عَلَيْهَا غَيْرَ أَنَّهُ لاَ يُصَلِّي عَلَيْهَا الْمَكْتُوبَةَ ‏.‏
It was narrated that Abdullah said:

"The messenger of Allah (peace be upon him) used to pray atop his mount while traveling, facing whatever direction it was facing, and he would pray witr atop it, but he did not pray the prescribed prayers atop it ".