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.
• Sahih al-Bukhari, 4488
• Sahih al-Bukhari, Vol. 6, Book of Prophetic Commentary on the Qur'an, Hadith 15
• Sahih al-Bukhari, Book of Prophetic Commentary on the Qur'an, Hadith 15