The Messenger of Allah ﷺ led them in offering the fear prayer. Some formed a row behind him and some formed a row facing the enemy. He led them in praying one rak'ah, then they moved away and the others came, and he led them in praying one rak'ah, then they got up and each (group) made up the other rak'ah. (Using translation from Nasāʾī 1536)
أَنَّ رَسُولَ اللهِ ﷺ «صَلَّى بِهِمْ صَلَاةَ الْخَوْفِ فَصَفَّ صَفًّا خَلْفَهُ وَصَفًّا مُصَافِّي الْعَدُوِّ فَصَلَّى بِهِمْ رَكْعَةً ثُمَّ ذَهَبَ هَؤُلَاءِ وَجَاءَ أُولَئِكَ فَصَلَّى بِهِمْ رَكْعَةً ثُمَّ قَامُوا فَقَضَوْا رَكْعَةً رَكْعَةً»