أَخْبَرَنَا قُتَيْبَةُ، عَنْ مَالِكٍ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، قَالَ بَيْنَمَا النَّاسُ بِقُبَاءٍ فِي صَلاَةِ الصُّبْحِ جَاءَهُمْ آتٍ فَقَالَ إِنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَدْ أُنْزِلَ عَلَيْهِ اللَّيْلَةَ قُرْآنٌ وَقَدْ أُمِرَ أَنْ يَسْتَقْبِلَ الْقِبْلَةَ ‏.‏ فَاسْتَقْبَلُوهَا وَكَانَتْ وُجُوهُهُمْ إِلَى الشَّامِ فَاسْتَدَارُوا إِلَى الْكَعْبَةِ ‏.‏

It was narrated that Ibn Umar said: "While the people were in Quba praying Subh prayer, someone came to them and said that revelation had come to Messenger of Allah(PBUH) the night before, and he had been commanded to face Ka'bah. So face toward it. They had been facing toward Ash-Sham, so they turned to face toward Ka'bah." Translation Not Available

Book Ref: Sunan An Nisai Book 9 Hadith 745
Web Ref:  Sunan An Nisai Vol 1 Book 9 Hadith 746