Abdullah bin Umar reported,

The Messenger of Allah ﷺ prayed one rakah with one of the two groups while the other group faced the enemy. Then they departed and took the place of the others, and the others came forward, and he prayed another rakah with them and gave the salam. Then this group stood and completed their remaining rakah, and the other group stood and completed their remaining rakah.

Nasai 1539

Sahih

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

عن سالم عن أبيه

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

النسائي 1539صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Prayer of fear
Chapter
Prayer of fear
Numbering
Darussalam 1539
Nasai 1539