[Machine] We were with the Messenger of Allah ﷺ on a march or expedition, and then a cloud covered us. We differed regarding the direction of the qibla (the direction towards which Muslims pray). Each of us prayed individually, and one of us drew a line in front of him to determine our position. When we looked at it in the morning, we realized that we had prayed in a direction other than the qibla. We informed the Prophet ﷺ about this, and he said, "Your prayers have been accepted." Muhammad ibn Salim and Muhammad ibn Ubaydullah Al-Arzami, who were both weak narrators according to Ata, Abu Abdur Rahman As-Sulami, and Abu Bakr Al-Harithi the jurist, reported this. Ali ibn Umar Al-Hafiz, who was a student of Ali ibn Omar Al-Hafiz, reported it. Abdullah ibn Muhammad ibn Abdul Aziz was reciting to me, and I am reporting your hadith, Dawud ibn Amru, as narrated by Al-Marthadi in a similar manner. Ali ibn Umar Al-Hafiz said: Muhammad ibn Salim said, and others also narrated it from Muhammad ibn Yazid, who narrated it from Muhammad ibn Ubaydullah Al-Arzami, who narrated it from Ata, who narrated it from Ata. Abu Hazim Al-Hafiz reported it, and Abu Ahmad Al-Hafiz reported it from Abu Tayyib Al-Husayn ibn Musa Al-Raqqi from Musa ibn Marwan Al-Raqqi from Muhammad ibn Yazid Al-Wasiti from Muhammad ibn Ubaydullah from Ata ibn Abi Rabah from Jabir ibn Abdullah. Ali ibn Omar Al-Hafiz mentioned it in a similar manner.
كُنَّا مَعَ رَسُولِ اللهِ ﷺ فِي مَسِيرٍ أَوْ سَرِيَّةٍ فَأَصَابَنَا غَيْمٌ فَتَحَرَّيْنَا وَاخْتَلَفْنَا فِي الْقِبْلَةِ فَصَلَّى كُلُّ رَجُلٍ مِنَّا عَلَى حِدَةٍ فَجَعَلَ أَحَدُنَا يَخُطُّ بَيْنَ يَدَيْهِ لِنَعْلَمَ أَمْكِنَتَنَا فَلَمَّا أَصْبَحْنَا نَظَرْنَاهُ فَإِذَا نَحْنُ قَدْ صَلَّيْنَا عَلَى غَيْرِ الْقِبْلَةِ فَذَكَرْنَا ذَلِكَ لِلنَّبِيِّ ﷺ فَقَالَ قَدْ أَجْزَأَتْ صَلَاتُكُمْ تَفَرَّدَ بِهِ مُحَمَّدُ بْنُ سَالِمٍ وَمُحَمَّدُ بْنُ عُبَيْدِ اللهِ الْعَرْزَمِيُّ عَنْ عَطَاءٍ وَهُمَا ضَعِيفَانِ أَخْبَرَنَاهُ أَبُو عَبْدِ الرَّحْمَنِ السُّلَمِيُّ وَأَبُو بَكْرٍ الْحَارِثِيُّ الْفَقِيهُ قَالَا أنبأ عَلِيُّ بْنُ عُمَرَ الْحَافِظُ قَالَ قُرِئَ عَلَى عَبْدِ اللهِ بْنِ مُحَمَّدِ بْنِ عَبْدِ الْعَزِيزِ وَأَنَا أَسْمَعُ حَدَّثَكُمْ دَاوُدُ بْنُ عَمْرٍو فَذَكَرَهُ بِمِثْلِ رِوَايَةِ الْمَرْثَدِيِّ ثُمَّ قَالَ عَلِيُّ بْنُ عُمَرَ الْحَافِظُ كَذَا قَالَ عَنْ مُحَمَّدِ بْنِ سَالِمٍ وَقَالَ غَيْرُهُ عَنْ مُحَمَّدِ بْنِ يَزِيدَ عَنْ مُحَمَّدِ بْنِ عُبَيْدِ اللهِ الْعَرْزَمِيِّ عَنْ عَطَاءٍ وَهُمَا ضَعِيفَانِ أَخْبَرَنَاهُ أَبُو حَازِمٍ الْحَافِظُ ثنا أَبُو أَحْمَدَ الْحَافِظُ ثنا أَبُو الطَّيِّبِ الْحُسَيْنُ بْنُ مُوسَى الرَّقِّيُّ بَأَنْطَاكِيَّةَ ثنا مُوسَى يَعْنِي ابْنَ مَرْوَانَ الرَّقِّيَّ ثنا مُحَمَّدُ بْنُ يَزِيدَ الْوَاسِطِيُّ عَنْ مُحَمَّدِ بْنِ عُبَيْدِ اللهِ عَنْ عَطَاءِ بْنِ أَبِي رَبَاحٍ عَنْ جَابِرِ بْنِ عَبْدِ اللهِ فَذَكَرَهُ بِمَعْنَاهُ