277- مالك عن عبد الله بن دينار أن عبد الله بن عمر قال: بينما الناس بقباء فى صلاة الصبح، إذ جاءهم آت، فقال: إن رسول الله صلى الله عليه وسلم قد أنزل عليه الليلة قرآن، وقد أمر أن يستقبل الكعبة فاستقبلوها، وكانت وجوههم إلى الشام، فاستداروا إلى الكعبة.
It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) that the people were performing the morning prayer in Quba when a man came and said: "The Qur'an has been revealed to the Messenger of Allah (peace and blessings be upon him) tonight, and he has been commanded to face the Ka'bah (in prayer)." They were praying towards Sham (the former qiblah), so they turned towards the Ka'bah during the prayer itself.
Related hadith on this topic