It is reported from someone who prayed the prayer of fear with the Messenger of Allah ﷺ one day at Dhat al-Riqa, that one group lined up with him while another group faced the enemy. He prayed one rakah with those who were with him, then remained standing while they completed the prayer for themselves. They then withdrew and lined up facing the enemy, and the other group came forward. He prayed with them the remaining rakah of his prayer, then remained seated while they completed the prayer for themselves, after which he gave the closing salam.Malik said, "This is the most pleasing of what I have heard regarding the prayer of fear."
حدثنا إسحاق بن عيسى أخبرني مالك عن يزيد بن رومان
عمن صلى مع رسول الله ﷺ ذات يوم الرقاع صلاة الخوف أن طائفة صفت معه وطائفة وجاه العدو فصلى بالتي معه ركعة ثم ثبت قائما وأتموا لأنفسهم ثم انصرفوا فصفوا وجاه العدو وجاءت الطائفة الأخرى فصلى بهم الركعة التي بقيت من صلاته ثم ثبت جالسا وأتموا لأنفسهم ثم سلم قال مالك وهذا أحب ما سمعت إلي في صلاة الخوف
Its chain of transmission is sahih. Salih bin Khawat bin Jubayr is trustworthy, and his hadith is found among the Jamaah. This hadith was narrated by Bukhari in Fath al-Bari, 7/421, no. 4129, in the chapter on military expeditions, and by Muslim, 1/575, no. 842, in the chapter on travelers, and by Abu Dawud, 2/13, no. 1238.