Yazid b. Ruman told on the authority of Salih b. Khawwat on the authority of one who prayed in time of danger with Messenger of Allah (may peace he upon him) at the Battle of Dhat ar-Riqa' that a group formed a row and prayed along with him, and a group faced the enemy. He led the group which was along with him in a rak'ah, then remained standing while they finished the prayer by themselves. Then they departed and formed a row facing the enemy. Then the second group came and he led them in the remaining rak'ah, after which he remained seated while they finished the prayer themselves. He then led them in salutation.
عَنْ صَالِحِ بْنِ خَوَّاتٍ عَمَّنْ صَلَّى مَعَ رَسُولِ اللَّهِ ﷺ يَوْمَ ذَاتِ الرِّقَاعِ صَلاَةَ الْخَوْفِ أَنَّ طَائِفَةً صَفَّتْ مَعَهُ وَطَائِفَةٌ وِجَاهَ الْعَدُوِّ فَصَلَّى بِالَّذِينَ مَعَهُ رَكْعَةً ثُمَّ ثَبَتَ قَائِمًا وَأَتَمُّوا لأَنْفُسِهِمْ ثُمَّ انْصَرَفُوا فَصَفُّوا وِجَاهَ الْعَدُوِّ وَجَاءَتِ الطَّائِفَةُ الأُخْرَى فَصَلَّى بِهِمُ الرَّكْعَةَ الَّتِي بَقِيَتْ ثُمَّ ثَبَتَ جَالِسًا وَأَتَمُّوا لأَنْفُسِهِمْ ثُمَّ سَلَّمَ بِهِمْ