Jami` at-Tirmidhi, Hadith 340 ⓘ
Al-Bara bin Azib narrated: "When Allah's Messener arrived in Al-Madinah, he faced Bait Al-Maqdis in Salat for sixteen or seventeen months. Allah's Messenger longed to face the direction of the Ka'bah, so Allah Most High revealed: Verily! We have seen the turning of your face towards the heaven. Surely We shall turn you o a Qiblah that shall please you. So turn your face in the direction of Al-Masjid Al-Haram.So he faced the Ka'bah, and he liked that. A man performed the Asr prayer with him, then passed by some of the Ansar who were bowing in Salat for Asr while facing Bait Al-Maqdis." He told them that he had faced the direction of the Ka'bah, so they changed (their direction) while they were bowing." [He said:] There are narrations on this topic from Ibn Umar, Ibn Abbas, Umarah bin Aws, Amr bin Awf Al-Muzani and Anas.
حَدَّثَنَا هَنَّادٌ، حَدَّثَنَا وَكِيعٌ، عَنْ إِسْرَائِيلَ، عَنْ أَبِي إِسْحَاقَ، عَنِ الْبَرَاءِ بْنِ عَازِبٍ، قَالَ لَمَّا قَدِمَ رَسُولُ اللَّهِ صلى الله عليه وسلم الْمَدِينَةَ صَلَّى نَحْوَ بَيْتِ الْمَقْدِسِ سِتَّةَ أَوْ سَبْعَةَ عَشَرَ شَهْرًا وَكَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُحِبُّ أَنْ يُوَجَّهَ إِلَى الْكَعْبَةِ فَأَنْزَلَ اللَّهُ تَعَالَىْ: (قَدْ نَرَى تَقَلُّبَ وَجْهِكَ فِي السَّمَاءِ فَلَنُوَلِّيَنَّكَ قِبْلَةً تَرْضَاهَا فَوَلِّ وَجْهَكَ شَطْرَ الْمَسْجِدِ الْحَرَامِ) فَوُجِّهَ نَحْوَ الْكَعْبَةِ وَكَانَ يُحِبُّ ذَلِكَ فَصَلَّى رَجُلٌ مَعَهُ الْعَصْرَ ثُمَّ مَرَّ عَلَى قَوْمٍ مِنَ الأَنْصَارِ وَهُمْ رُكُوعٌ فِي صَلاَةِ الْعَصْرِ نَحْوَ بَيْتِ الْمَقْدِسِ فَقَالَ هُوَ يَشْهَدُ أَنَّهُ صَلَّى مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم وَأَنَّهُ قَدْ وُجِّهَ إِلَى الْكَعْبَةِ . قَالَ فَانْحَرَفُوا وَهُمْ رُكُوعٌ . قَالَ وَفِي الْبَابِ عَنِ ابْنِ عُمَرَ وَابْنِ عَبَّاسٍ وَعُمَارَةَ بْنِ أَوْسٍ وَعَمْرِو بْنِ عَوْفٍ الْمُزَنِيِّ وَأَنَسٍ . قَالَ أَبُو عِيسَى وَحَدِيثُ الْبَرَاءِ حَدِيثٌ حَسَنٌ صَحِيحٌ . وَقَدْ رَوَاهُ سُفْيَانُ الثَّوْرِيُّ عَنْ أَبِي إِسْحَاقَ .
also referenced under: Book 2, Hadith 192 (In-Book) & Volume 1, Book 2, Hadith 340 (DarusSalam)