Marwan bin Hakam reported,

He asked Abu Hurairah, "Did you pray the prayer of fear with the Messenger of Allah ﷺ?"Abu Hurairah replied, "Yes."Marwan asked, "When?"Abu Hurairah said, "In the year of the expedition of Najd. The Messenger of Allah ﷺ stood for the afternoon prayer. One group stood with him, while another group faced the enemy with their backs toward the qiblah. The Messenger of Allah ﷺ said the takbir, and they all said the takbir together, both those with him and those facing the enemy. Then the Messenger of Allah ﷺ performed one bowing, and the group with him bowed as well. Then he prostrated, and the group nearest to him prostrated, while the others remained standing facing the enemy. Then the Messenger of Allah ﷺ stood up, and the group with him stood as well, and they went toward the enemy and faced them. The group that had been facing the enemy then came forward, bowed, and prostrated while the Messenger of Allah ﷺ remained standing. Then they stood up. The Messenger of Allah ﷺ performed another bowing and they bowed with him, and he prostrated as before, and they prostrated with him. Then the group that had been facing the enemy came forward, bowed, and prostrated while the Messenger of Allah ﷺ was sitting along with those who were with him. Then came the salam. The Messenger of Allah ﷺ gave the salam and they all gave the salam together. So the Messenger of Allah ﷺ had completed two units, while each man from the two groups had completed one unit each."

Azami 2907

Sahih

عن مروان بن الحكم

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

الأعظمي 2907صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Prayer of fear
Section
Imam praying one rakat with each group, then waiting until each group completes their own prayer, then giving the salam with everyone
Numbering
Jami al-Kamil 2907 (2nd edition)
Azami 2907