Abdullah bin Umar reported,

While the people were performing the dawn prayer at Quba, a man came to them and said, "Quran was revealed during the night commanding that the Kaabah be faced." So they turned toward it. They had been facing Sham, and they pivoted as they were until they faced the Kaabah.

Bukhari 4493

Sahih

حدثنا موسى بن إسماعيل حدثنا عبد العزيز بن مسلم حدثنا عبد الله بن دينار قال سمعت

ابن عمر رضي الله عنهما يقول

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

البخاري 4493صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
"And from wherever you go out, turn your face toward Masjid al-Haram, and indeed it is the truth from your Lord. And Allah is not unaware of what you do." Shatrahu means facing toward it
Numbering
Darussalam 4493
Bukhari 4493