Concerning those who witnessed the Fear Prayer that was performed in the battle of Dhat-ur-Riqa' in the company of Messenger of Allah ﷺ; One batch lined up behind him while another batch (lined up) facing the enemy. The Prophet ﷺ led the batch that was with him in one rakʿa, and he stayed in the standing posture while that batch completed their (two rakʿat) prayer by themselves and went away, lining in the face of the enemy, while the other batch came and he (i.e. the Prophet) offered his remaining rakʿa with them, and then, kept on sitting till they completed their prayer by themselves, and he then finished his prayer with Taslim along with them.
عَنْ صَالِحِ بْنِ خَوَّاتٍ عَمَّنْ شَهِدَ رَسُولَ اللَّهِ ﷺ يَوْمَ ذَاتِ الرِّقَاعِ صَلَّى صَلاَةَ الْخَوْفِ أَنَّ طَائِفَةً صَفَّتْ مَعَهُ وَطَائِفَةٌ وُجَاهَ الْعَدُوِّ فَصَلَّى بِالَّتِي مَعَهُ رَكْعَةً ثُمَّ ثَبَتَ قَائِمًا وَأَتَمُّوا لأَنْفُسِهِمْ ثُمَّ انْصَرَفُوا فَصَفُّوا وُجَاهَ الْعَدُوِّ وَجَاءَتِ الطَّائِفَةُ الأُخْرَى فَصَلَّى بِهِمِ الرَّكْعَةَ الَّتِي بَقِيَتْ مِنْ صَلاَتِهِ ثُمَّ ثَبَتَ جَالِسًا وَأَتَمُّوا لأَنْفُسِهِمْ ثُمَّ سَلَّمَ بِهِمْ