كتاب إقامة الصلاة والسنة فيها
5  
Establishing the Prayer and the Sunnah Regarding Them
(60)
Chapter: Whoever performs Prayer facing a direction other than the Qiblah without realizing
(60)
باب مَنْ يُصَلِّي لِغَيْرِ الْقِبْلَةِ وَهُوَ لاَ يَعْلَمُ
Sunan Ibn Majah 1020
It was narrated from ‘Abdullah bin ‘Amir bin Rabi’ah that his father said:
“We were with the Messenger of Allah (ﷺ) on a journey, and the sky was overcast so it was difficult for us to determine the Qiblah. So we performed prayer, and we marked the location.* Later, when the sun reappeared, we realized that we had prayed facing a direction other than the Qiblah. We mentioned that to the Prophet (ﷺ), then the Words were revealed: ‘So wherever you turn there is the Face of Allah.’” [2:115]
حَدَّثَنَا يَحْيَى بْنُ حَكِيمٍ، حَدَّثَنَا أَبُو دَاوُدَ، حَدَّثَنَا أَشْعَثُ بْنُ سَعِيدٍ أَبُو الرَّبِيعِ السَّمَّانُ، عَنْ عَاصِمِ بْنِ عُبَيْدِ اللَّهِ، عَنْ عَبْدِ اللَّهِ بْنِ عَامِرِ بْنِ رَبِيعَةَ، عَنْ أَبِيهِ، قَالَ كُنَّا مَعَ رَسُولِ اللَّهِ ـ صلى الله عليه وسلم ـ فِي سَفَرٍ فَتَغَيَّمَتِ السَّمَاءُ وَأَشْكَلَتْ عَلَيْنَا الْقِبْلَةُ فَصَلَّيْنَا وَأَعْلَمْنَا فَلَمَّا طَلَعَتِ الشَّمْسُ إِذَا نَحْنُ قَدْ صَلَّيْنَا لِغَيْرِ الْقِبْلَةِ فَذَكَرْنَا ذَلِكَ لِلنَّبِيِّ ـ صلى الله عليه وسلم ـ فَأَنْزَلَ اللَّهُ ‏{فَأَيْنَمَا تُوَلُّوا فَثَمَّ وَجْهُ اللَّهِ}‏ ‏.‏
Grade: Da’if (Darussalam)
Reference : Sunan Ibn Majah 1020
In-book reference : Book 5, Hadith 218
English translation : Vol. 1, Book 5, Hadith 1020