The Messenger of Allah ﷺ led his companions in offering the fear prayer. One group prayed with him while the other was facing the enemy. He led them in praying two rak'ahs, then they went and took the place of the others, and the others came and he led them in praying two rak'ahs, then he said the taslim.
أَنَّ رَسُولَ اللَّهِ ﷺ صَلَّى بِأَصْحَابِهِ صَلاَةَ الْخَوْفِ فَصَلَّتْ طَائِفَةٌ مَعَهُ وَطَائِفَةٌ وُجُوهُهُمْ قِبَلَ الْعَدُوِّ فَصَلَّى بِهِمْ رَكْعَتَيْنِ ثُمَّ قَامُوا مَقَامَ الآخَرِينَ وَجَاءَ الآخَرُونَ فَصَلَّى بِهِمْ رَكْعَتَيْنِ ثُمَّ سَلَّمَ