Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) said that the people were offering the Fajr prayer in Quba when a person came and informed them that revelation had come to the Messenger of Allah (peace and blessings be upon him) yesterday, and he has been commanded to face the Ka'bah (in prayer). So those people also turned their faces towards the Ka'bah. At that time, they were facing towards Syria, so they all turned towards the Ka'bah.
Hadith Referenceاللؤلؤ والمرجان / كتاب المساجد ومواضع الصلاة / 304
Hadith Gradingمحدثین:«صحیح»
Hadith Takhrij«صحیح، أخرجه البخاري في: 8 كتاب الصلاة: 32 باب ما جاء في القبلة»