كتاب الصلاة
2  
The Book of Prayer
Bulugh al-Maram 211
Narrated 'Aamir bin Rabi'ah (RA):
We were with the Prophet (ﷺ) during a dark night and we became uncertain about the Qiblah (the direction of Makkah) we then prayed (without being certain). When the run rose, we discovered that we prayed towards a direction other than the Qiblah. So this Verse was revealed: "...so wherever you turn yourselves or your faces, there is the Face of Allah..." [Reported by at-Tirmidhi who graded it Da'if (weak)].
وَعَنْ عَامِرِ بْنِ رَبِيعَةَ ‏- رضى الله عنه ‏- قَالَ : { كُنَّا مَعَ اَلنَّبِيِّ ‏- صلى الله عليه وسلم ‏-فِي لَيْلَةٍ مَظْلَمَةٍ , فَأَشْكَلَتْ عَلَيْنَا اَلْقِبْلَةُ , فَصَلَّيْنَا .‏ فَلَمَّا طَلَعَتِ اَلشَّمْسُ إِذَا نَحْنُ صَلَّيْنَا إِلَى غَيْرِ اَلْقِبْلَةِ , فَنَزَلَتْ : (فَأَيْنَمَا تُوَلُّوا فَثَمَّ وَجْهُ اَللَّهِ )‏ } أَخْرَجَهُ اَلتِّرْمِذِيُّ وَضَعَّفَهُ .‏ 1
Reference : Bulugh al-Maram 211
In-book reference : Book 2, Hadith 211
English translation : Book 2, Hadith 209
Hadith Text
Reference