He said, the Messenger of Allah ﷺ led the prayer of fear with one of the two groups, performing one rakah, while the other group faced the enemy. Then that group withdrew and took the position of their companions, facing the enemy, and the others came forward, and the Prophet ﷺ led them in one rakah, then gave the salam. After that, this group completed one rakah and that group completed one rakah.
حدثنا عبد الرزاق أخبرنا معمر عن الزهري عن سالم
قال صلى رسول الله ﷺ صلاة الخوف بإحدى الطائفتين ركعة والطائفة الأخرى مواجهة العدو ثم انصرفوا وقاموا في مقام أصحابهم مقبلين على العدو وجاء أولئك فصلى بهم النبي ﷺ ركعة ثم سلم ثم قضى هؤلاء ركعة وهؤلاء ركعة
Its chain of transmission is sahih, and it is a repetition of 9159. We noted there the narration of Abu Dawud, 1:482, from the narration of Mamar from Zuhri, and here again is the narration of Mamar. Hafiz bin Kathir cited it in his tafsir, 569, from the narration of Ibn Abu Hatim, from his father, from Naeem bin Hammad, from Abdullah bin Mubarak, from Mamar, from Zuhri, in similar wording, then Ibn Kathir said, this hadith was narrated by the group in their books through the route of Mamar, from him.This hadith has many routes of transmission from a number of the companions, and it is found in Sahih Muslim, 230:1, from Abd bin Humayd, from Abdul-Razzaq, with this chain of transmission. See also 6194, 6377, 6378.