Sunan an-Nasa'i, Book 18, Hadith 16 (In-Book)

Abu Hurairah said: "The Messenger of Allah was camping between Dajnan and 'Usfan, besieging the idolaters. The idolaters said: 'These people have a prayer that is dearer to them than their sons and daughters. Plan it, then strike them with a single heavy blow.' Jibril, peace be upon him, came and told the Messenger of Allah to divide his companions into two groups, then lead one group in prayer while the others faced the enemy, on guard and with weapons at the ready. So he led them in praying one rak'ah, then they moved back and the others moved forward, and he led them in praying on rak'ah, so that each one of them had prayed one rak'ah with the Prophet and the Prophet had prayed two rak'ahs."

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

sunnah.com