Abdullah bin Umar reported,

The Messenger of Allah ﷺ led the prayer of fear, performing one rakah with one of the two groups while the other group faced the enemy. Then that group withdrew and took the place of their companions, facing the enemy, and the others came forward. The Prophet ﷺ then prayed one rakah with them, after which the Prophet ﷺ gave the closing salutation. Then the first group completed their remaining rakah, and the second group completed their remaining rakah.

Muslim 1942

Sahih

حدثنا عبد بن حميد أخبرنا عبد الرزاق أخبرنا معمر عن الزهري عن سالم

عن ابن عمر قال

صلى رسول الله ﷺ صلاة الخوف بإحدى الطائفتين ركعة والطائفة الأخرى مواجهة العدو ثم انصرفوا وقاموا في مقام أصحابهم مقبلين على العدو وجاء أولئك ثم صلى بهم النبي ﷺ ركعة ثم سلم النبي ﷺ ثم قضى هؤلاء ركعة وهؤلاء ركعة

مسلم 1942صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Virtues of the Quran and what relates to it
Chapter
Prayer of fear
Numbering
Darussalam 1942
Muslim 1942