Sahih Muslim , Book 4, Hadith 279 (In-Book)

Ibn 'Umar said: The Apostle of Allah used to place his camel (towards the Ka'ba) and said prayer in its direction.

حَدَّثَنَا أَحْمَدُ بْنُ حَنْبَلٍ، حَدَّثَنَا مُعْتَمِرُ بْنُ سُلَيْمَانَ، عَنْ عُبَيْدِ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم كَانَ يَعْرِضُ رَاحِلَتَهُ وَهُوَ يُصَلِّي إِلَيْهَا ‏.‏

sunnah.com