أَخْبَرَنَا مَالِكٌ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، قَالَ: بَيْنَمَا النَّاسُ بِقُبَاءٍ فِي صَلَاةِ الصُّبْحِ إِذْ جَاءَهُمْ آتٍ، فَقَالَ: إِنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَدْ أُنْزِلَ عَلَيْهِ اللَّيْلَةَ قُرْآنٌ، وَقَدْ أُمِرَ أَنْ يَسْتَقْبِلَ الْقِبْلَةَ، فَاسْتَقْبَلُوهَا. وَكَانَتْ وُجُوهُهُمْ إِلَى الشَّامِ، فَاسْتَدَارُوا إِلَى الْكَعْبَةِ.
It is narrated from Ibn Umar (may Allah be pleased with them both) that he said: "The people were performing the Fajr prayer in Quba when a man came and informed them that during the night, Qur'an had been revealed to the Prophet ﷺ in which he was commanded to face the Ka'bah (in prayer). So those people also turned their faces towards the Ka'bah, while at that time their faces were towards Syria; they all turned towards the Ka'bah."