Hadithcore
Jami` at-Tirmidhi, 2964
hasan· Darussalam

Narrated Ibn 'Abbas:

"When the Prophet (ﷺ) began facing the Ka'bah they said: 'O Messenger of Allah! How about our brothers who died while they were praying toward Bait Al-Maqdis?' So Allah Most High revealed: Allah would not allow your faith to be wasted. (2:143)"

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

References2 variants
In-Book Reference
Book 47, Hadith 16
English Reference
Vol. 5, Book 44, Hadith 2964