[Machine] The Messenger of Allahﷺ performed the prayer of fear, with those behind him forming a row, and another row equivalent to the enemy. He prayed with them one unit of prayer, then these (those who were behind him) went to the position of these (those equivalent to the enemy), and these (those equivalent to the enemy) came (forward), and he prayed with them one unit of prayer, then he said the tasleem. So it was two units for the Prophetﷺ and one unit for each group.
صَلَّى رَسُولُ اللهِ ﷺ صَلَاةَ الْخَوْفِ بِذِي قَرَدٍ صَفًّا خَلْفَهُ وَصَفًّا مُوَازِيَ الْعَدُوِّ وَصَلَّى بِهِمْ رَكْعَةً ثُمَّ ذَهَبَ هَؤُلَاءِ إِلَى مَصَافِّ هَؤُلَاءِ وَجَاءَ هَؤُلَاءِ فَصَلَّى بِهِمْ رَكْعَةً ثُمَّ سَلَّمَ فَكَانَتْ لِلنَّبِيِّ ﷺ رَكْعَتَيْنِ وَلِكُلِّ طَائِفَةٍ رَكْعَةً