The Messenger of Allah ﷺ led them in offering the fear prayer. One row stood in front of him and another row stood behind him. He led those who were behind in prayer, bowing once and prostrating twice, then they moved forward until they took the place of their companions, and the others came and took their place, and the Messenger of Allah ﷺ led them in prayer, bowing once and prostrating twice, then he said the taslim, so the Prophet ﷺ had prayed two rak'ahs and they had prayed one. (Using translation from Nasāʾī 1545)
«أَنَّ رَسُولَ اللهِ ﷺ صَلَّى بِهِمْ صَلَاةَ الْخَوْفِ فَقَامَ صَفٌّ بَيْنَ يَدَيْهِ وَصَفٌّ خَلْفَهُ صَلَّى بِالَّذِينَ خَلْفَهُ رَكْعَةً وَسَجْدَتَيْنِ ثُمَّ تَقَدَّمَ هَؤُلَاءِ حَتَّى قَامُوا فِي مَقَامِ أَصْحَابِهِمْ وَجَاءَ أُولَئِكَ فَقَامُوا مَقَامَ هَؤُلَاءِ صَلَّى لَهُمْ رَسُولُ اللهِ ﷺ رَكْعَةً وَسَجْدَتَيْنِ ثُمَّ سَلَّمَ فَكَانَ لِلنَّبِيِّ ﷺ رَكْعَتَانِ وَلَهُمْ رَكْعَةٌ»