Sahih Bukhari – Hadith No : 4529

Narrated Ibn `Umar: While some people were offering Fajr prayer in the Quba’ mosque, some-one came and said, “Allah has revealed to the Prophet Qur’anic instructions that you should face the Ka`ba (while praying) so you too, should face it.” Those people then turned towards the Ka`ba.

Hadith In Arabic Text :

حدثنا مسدد، حدثنا يحيى، عن سفيان، عن عبد الله بن دينار، عن ابن عمر رضى الله عنهما بينا الناس يصلون الصبح في مسجد قباء إذ جاء جاء فقال أنزل الله على النبي صلى الله عليه وسلم قرآنا أن يستقبل الكعبة فاستقبلوها‏.‏ فتوجهوا إلى الكعبة‏.‏

Chapter : Prophetic Commentary on the Qur’an (Tafseer of the Prophet (pbuh)) – كتاب التفسير