Abdullah bin Umar reported,

While the people were performing the morning prayer in the mosque of Quba, someone came to them and said, "The Messenger of Allah ﷺ has had Quran revealed to him during the night, and he has been commanded to face the Kaabah, so face it."They had been facing toward Sham, so they turned around and faced toward the Kaabah.

Ahmad 4642

Sahih

حدثنا يحيى بن سعيد عن سفيان حدثني عبد الله بن دينار سمعت

ابن عمر يقول

بينما الناس يصلون في مسجد قباء الغداة إذ جاء جاء فقال إن رسول الله ﷺ قد أنزل عليه الليلة قرآن وأمر أن تستقبل الكعبة فاستقبلوها واستداروا فتوجهوا نحو الكعبة

أحمد 4642صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Umar
Numbering
Darussalam 4642
Ahmad 4642