"While the people were in Quba', praying the Subh prayer, someone came to them and said that revelation had come to the Messenger of Allah (ﷺ) the night before, and he has been commanded to face the Ka'bah. So they turned around, and they has been facing toward Ash-Sham, but now they turned to face toward the Ka'bah."
Reference: Sunan an-Nasa'i 493 In-book : Book 5, Hadith 46 English translation : Vol. 1, Book 5, Hadith 494
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.