Abdullah bin Umar reported,

While the people were performing the dawn prayer at the mosque of Quba, someone came and announced, "Allah has revealed to the Prophet ﷺ verses commanding him to face the Kaabah, so face it." They then turned toward the Kaabah.

Bukhari 4488

Sahih

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

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

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

البخاري 4488صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
His saying, "And We did not make the qibla which you used to face except that We might make evident who follows the Messenger from who would turn back on his heels. And indeed it was difficult except for those whom Allah has guided. And never would Allah have caused you to lose your faith. Indeed Allah is to the people Kind and Merciful."
Numbering
Darussalam 4488
Bukhari 4488