"Abdullah bin 'Umar used to narrate that he offered the fear prayer with the Messenger of Allah ﷺ. He said: 'The Prophet ﷺ said the takbir and one group of us formed a row behind him while the other group faced the enemy. The Prophet ﷺ led them in bowing once and prostrating twice, then they moved away and faced the enemy, and the other group came and prayed with the Prophet ﷺ, doing likewise. Then he said the taslim, then each man of both groups stood and prayed by himself, bowing once and prostrating twice.'" (Using translation from Nasāʾī 1540)
أَنَّهُ صَلَّاهَا مَعَ النَّبِيِّ ﷺ قَالَ فَكَبَّرَ رَسُولُ اللهِ ﷺ فَصَفَّ وَرَاءَهُ طَائِفَةٌ مِنَّا وَأَقْبَلَتْ طَائِفَةٌ عَلَى الْعَدُوِّ فَرَكَعَ بِهِمْ رَسُولُ اللهِ ﷺ رَكْعَةً وَسَجْدَتَيْنِ سَجَدَ مِثْلَ نِصْفِ صَلَاةِ الصُّبْحِ ثُمَّ انْصَرَفُوا فَأَقْبَلُوا عَلَى الْعَدُوِّ فَجَاءَتِ الطَّائِفَةُ الْأُخْرَى فَصَفُّوا مَعَ النَّبِيِّ ﷺ فَفَعَلَ مِثْلَ ذَلِكَ ثُمَّ سَلَّمَ النَّبِيُّ ﷺ فَقَامَ كُلُّ رَجُلٍ مِنَ الطَّائِفَتَيْنِ فَصَلَّى لِنَفْسِهِ رَكْعَةً وَسَجْدَتَيْنِ