حَدَّثَنَا يَحْيَى بْنُ قَزَعَةَ، حَدَّثَنَا مَالِكٌ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، قَالَ بَيْنَا النَّاسُ بِقُبَاءٍ فِي صَلاَةِ الصُّبْحِ إِذْ جَاءَهُمْ آتٍ فَقَالَ إِنَّ النَّبِيَّ صلى الله عليه وسلم قَدْ أُنْزِلَ عَلَيْهِ اللَّيْلَةَ قُرْآنٌ، وَقَدْ أُمِرَ أَنْ يَسْتَقْبِلَ الْكَعْبَةَ فَاسْتَقْبِلُوهَا‏.‏ وَكَانَتْ وُجُوهُهُمْ إِلَى الشَّأْمِ فَاسْتَدَارُوا إِلَى الْكَعْبَةِ‏.‏

Narrated Ibn `Umar: While some people were offering Fajr prayer at Quba' (mosque), some-one came to them and said, "Tonight some Qur'anic Verses have been revealed to the Prophet (PBUH) and he has been ordered to face the Ka`ba (at Mecca) (during prayers), so you too should turn your faces towards it." At that time their faces were towards Sham (Jerusalem) so they turned towards the Ka`ba (at Mecca). Translation Not Available

Book Ref: Sahih Bukhari Book 65 Hadith 4491
Web Ref:  Sahih Bukhari Vol 6 Book 60 Hadith 18