"I went out on a campaign with the Messenger of Allah ﷺ toward Najd. We confronted the enemy and formed ranks facing them. The Messenger of Allah ﷺ stood up and led us in prayer. Some of us stood with him and some of us faced the enemy. The Messenger of Allah ﷺ bowed and those who were with him bowed, and prostrated twice. Then they moved away and took the place of the others, and the other group who had not prayed came and he led them in bowing once and prostrating twice. Then the Messenger of Allah ﷺ said the salam and each of the Muslims stood up and bowed once, and prostrated twice individually." (Using translation from Nasāʾī 1539)
غَزَوْتُ مَعَ رَسُولِ اللهِ ﷺ غَزْوَةً قِبَلَ نَجْدٍ فَوَافَيْنَا الْعَدُوَّ فَصَافَفْنَاهُمْ فَقَامَ رَسُولُ اللهِ ﷺ فَصَلَّى لَنَا فَقَامَتْ طَائِفَةٌ مِنَّا مَعَهُ وَأَقْبَلَتْ طَائِفَةٌ عَلَى الْعَدُوِّ فَرَكَعَ رَسُولُ اللهِ ﷺ بِمَنْ مَعَهُ رَكْعَةً وَسَجْدَتَيْنِ ثُمَّ انْصَرَفُوا فَكَانُوا مَكَانَ الطَّائِفَةِ الَّتِي لَمْ تُصَلِّ وَجَاءَتِ الطَّائِفَةُ الَّتِي لَمْ تُصَلِّ فَرَكَعَ بِهِمْ رَسُولُ اللهِ ﷺ رَكْعَةً وَسَجْدَتَيْنِ ثُمَّ سَلَّمَ رَسُولُ اللهِ ﷺ وَقَامَ كُلُّ رَجُلٍ مِنَ الْمُسْلِمِينَ فَرَكَعَ لِنَفْسِهِ رَكْعَةً وَسَجْدَتَيْنِ