[Machine] While people were performing the Fajr prayer in Quba, a man came to them and said, "Verily, the Messenger of Allah ﷺ has been revealed the Quran and he has been commanded to face the Kaaba in prayer, so face towards it." The people's faces were initially directed towards Sham (Syria) but they turned and faced towards the Kaaba.
بَيْنَمَا النَّاسُ فِي صَلَاةِ الْفَجْرِ فِي قُبَاءٍ إذ جَاءَهُمْ رَجُلٌ فَقَالَ «إِنَّ رَسُولَ اللَّهِ ﷺ أُنْزِلَ عَلَيْهِ الْقُرْآنُ وَأُمِرَ أَنْ يَسْتَقْبِلَ الْكَعْبَةَ فَاسْتَقْبِلُوهَا وَكَانَ وُجهُ النَّاسِ إِلَى الشَّامِ فَاسْتَدَارُوا فَوَجَّهُوا إِلَى الْكَعْبَةِ»