Narrated Ibn `Umar:
While some people were offering morning prayer at Quba' a man came to them and said, "A Qur'anic Order has been revealed to Allah's Messenger (ﷺ) tonight that he should face the Ka`ba at Mecca (in prayer), so you too should turn your faces towards it." At that moment their faces were towards Sham (i.e. Jerusalem) (and on hearing that) they turned towards the Ka`ba (at Mecca).
Reference | : Sahih al-Bukhari 4490 |
In-book reference | : Book 65, Hadith 17 |
USC-MSA web (English) reference | : Vol. 6, Book 60, Hadith 17 |
(deprecated numbering scheme) |