Hadithcore
Sahih Muslim, 525 b
sahih

Abu Ishaq reported:

I heard al-Bara' saying: We prayed with the Messenger of Allah (ﷺ) (with our faces) towards Bait-ul-Maqdis for sixteen months or seventeen months. Then we were made to change (our direction) towards the Ka'ba.

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

References2 variants
In-Book Reference
Book 5, Hadith 17
USC-MSA web (English) reference
Book 4, Hadith 1072 (deprecated numbering scheme)
Related hadiths2
Compare isnād across 2 related chains →