Qasim bin Hassan reported,

I came to Zayd bin Thabit and asked him about the prayer of fear. He said, "The Messenger of Allah ﷺ led the prayer with one row standing behind him and another row facing the enemy. He prayed one rakah with them, then they went to take the position of their companions, and the other group came forward. He prayed one rakah with them, then another rakah, and then concluded with the salam. So the Prophet ﷺ prayed two rakahs, while each group prayed one rakah."

Azami 2913

Hasan

عن القاسم بن حسان قال

أتيت زيد بن ثابت فسألته صلاة الخوف فقال: صلى رسول الله ﷺ وصف خلفه، وصف بإزاء العدو، فصلى بهم ركعة، ثم ذهبوا إلى مصاف إخوانهم، وجاء الآخرون، فصلى بهم ركعة، ثم ركعة، ثم سلم، فكان للنبي ﷺ ركعتان ولكل طائفة ركعة.

الأعظمي 2913حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Prayer of fear
Section
Whoever said, "In fear there is one rakat"
Numbering
Jami al-Kamil 2913 (2nd edition)
Azami 2913