Sunan Abi Dawud, Hadith 1236

Urwah ibn az-Zubayr reported that Marwan ibn al-Hakam asked AbuHurayrah: Did you pray in time of danger with the Messenger of Allah? AbuHurayrah replied: Yes. Marwan then asked: When? AbuHurayrah said: On the occasion of the Battle of Najd. The Messenger of Allah stood up to offer the afternoon prayer. One section stood with him (to pray) and the other was standing before the enemy, and their backs were towards the qiblah. The Messenger of Allah uttered the takbir and all of them too uttered the takbir, i.e. those who were with him and those who were facing the enemy. Then the Messenger of Allah offered one rak'ah and the section that was with him also prayed one rak'ah. He then prostrated himself and those who were with him also prostrated, while the other section was standing before the enemy. The Messenger of Allah then stood up and the section with him also stood up. They went and faced the enemy and the section that was previously facing the enemy stepped forward. They bowed and prostrated while the Messenger of Allah was standing in the same position. Then they stood up and the Messenger of Allah (may peace be upon) prayed another rak'ah and all of them bowed and prostrated along with him. After that the section that was standing before the enemy came forward and they bowed and prostrated, while the Messenger of Allah remained seated and also those who were with him. The salutation then followed. The Messenger of Allah uttered the salutation and all of them uttered it together. The Messenger of Allah prayed two rak'ahs and each of the two sections prayed one rak'ah with him (and the other by themselves).

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

sunnah.com