One group had formed a row behind him and another group faced the enemy. He led those who were with him in praying one rak'ah, then he remained standing and they completed the prayer by themselves. Then they moved away and formed a row facing the enemy, and the other group came and he led them in praying the rak'ah that was left for him, then he remained sitting while they completed the prayer by themselves, then he said the taslim with them.
عَنْ صَالِحِ بْنِ خَوَّاتٍ عَمَّنْ صَلَّى مَعَ رَسُولِ اللَّهِ ﷺ يَوْمَ ذَاتِ الرِّقَاعِ صَلاَةَ الْخَوْفِ أَنَّ طَائِفَةً صَفَّتْ مَعَهُ وَطَائِفَةٌ وُجَاهَ الْعَدُوِّ فَصَلَّى بِالَّذِينَ مَعَهُ رَكْعَةً ثُمَّ ثَبَتَ قَائِمًا وَأَتَمُّوا لأَنْفُسَهِمْ ثُمَّ انْصَرَفُوا فَصَفُّوا وُجَاهَ الْعَدُوِّ وَجَاءَتِ الطَّائِفَةُ الأُخْرَى فَصَلَّى بِهِمُ الرَّكْعَةَ الَّتِي بَقِيَتْ مِنْ صَلاَتِهِ ثُمَّ ثَبَتَ جَالِسًا وَأَتَمُّوا لأَنْفُسِهِمْ ثُمَّ سَلَّمَ بِهِمْ