Hadith 430

نا مُحَمَّدُ بْنُ أَبِي صَفْوَانَ الثَّقَفِيُّ، حَدَّثَنَا بَهْزٌ يَعْنِي ابْنَ أَسَدٍ، نا حَمَّادُ بْنُ سَلَمَةَ، نا ثَابِتٌ، عَنْ أَنَسٍ، أَنَّ النَّبِيَّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ وَأَصْحَابَهُ كَانُوا " يُصَلُّونَ نَحْوَ بَيْتِ الْمَقْدِسِ، فَلَمَّا نَزَلَتْ هَذِهِ الْآيَةُ {فَوَلِّ وَجْهَكَ شَطْرَ الْمَسْجِدِ الْحَرَامِ} [البقرة: ١٤٤] مَرَّ رَجُلٌ مِنْ بَنِي سَلَمَةَ فَنَادَاهُمْ وَهُمْ رُكُوعٌ فِي صَلَاةِ الْفَجْرِ أَلَا إِنَّ الْقِبْلَةَ قَدْ حُوِّلَتْ إِلَى الْكَعْبَةِ، فَمَالُوا رُكُوعًا "
It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) and his noble companions (may Allah be pleased with them) used to perform prayers facing Bayt al-Maqdis. Then when this verse was revealed: « فَوَلِّ وَجْهَكَ شَطْرَ الْمَسْجِدِ الْحَرَامِ » [ سورة البقرة ] "Turn your face towards Masjid al-Haram," a man from Banu Salamah passed by while they were in the bowing position during the Fajr prayer, and he called out to them, saying, "Be aware that the Qiblah has been changed towards the noble Ka'bah." So they turned (towards the noble Ka'bah) while still in the bowing position.
Hadith Reference صحيح ابن خزيمه / جماع أبواب الأذان والإقامة / 430
Hadith Takhrij صحيح مسلم