Hadith on Qiblah: Changing direction of prayer from Jerusalem to Mecca

Anas ibn Malik reported: The Messenger of Allah, peace and blessings be upon him, used to pray towards the Sacred House in Jerusalem, then it was revealed to him, “We have certainly seen you turning your face to the heaven. We will surely turn you to a direction of prayer that will please you. Turn your face toward the Sacred Mosque,” (2:144). A man from the tribe of Salimah passed those who were bowing in dawn prayer, having finished one cycle. The man announced, “Indeed, the direction of prayer has been has been changed!” They moved their direction while in that state.

Source: Ṣaḥīḥ Muslim 527

Grade: Sahih (authentic) according to Muslim

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

527 صحيح مسلم كتاب المساجد ومواضع الصلاة باب تحويل القبلة من القدس إلى الكعبة