Sahih al-Bukhari 1100
Book 18: Shortening the Prayers (At-Taqseer) · Narrated by Anas bin Seereen
Arabic
حَدَّثَنَا أَحْمَدُ بْنُ سَعِيدٍ، قَالَ حَدَّثَنَا حَبَّانُ، قَالَ حَدَّثَنَا هَمَّامٌ، قَالَ حَدَّثَنَا أَنَسُ بْنُ سِيرِينَ، قَالَ اسْتَقْبَلْنَا أَنَسًا حِينَ قَدِمَ مِنَ الشَّأْمِ، فَلَقِينَاهُ بِعَيْنِ التَّمْرِ، فَرَأَيْتُهُ يُصَلِّي عَلَى حِمَارٍ وَوَجْهُهُ مِنْ ذَا الْجَانِبِ، يَعْنِي عَنْ يَسَارِ الْقِبْلَةِ. فَقُلْتُ رَأَيْتُكَ تُصَلِّي لِغَيْرِ الْقِبْلَةِ. فَقَالَ لَوْلاَ أَنِّي رَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم فَعَلَهُ لَمْ أَفْعَلْهُ. رَوَاهُ ابْنُ طَهْمَانَ عَنْ حَجَّاجٍ عَنْ أَنَسِ بْنِ سِيرِينَ عَنْ أَنَسٍ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم.
English translation
Narrated Anas bin Seereen:We went to receive Anas bin Malik when he returned from Sham and met him at a place called 'Ain at-Tamr. I saw him praying riding the donkey, with his face to this direction, i.e. to the left of the Qibla. I said to him, "I have seen you offering the prayer in a direction other than that of the Qibla." He replied, "If I had not seen Allah's Messenger (ﷺ) doing it, I would not have done it
Reference: Sahih al-Bukhari 1100, Book of Shortening the Prayers (At-Taqseer). English translation by Dr. Muhammad Muhsin Khan.