Sahl bin Abu Hathma reported,

The Prophet ﷺ led his companions in the prayer of fear, arranging them behind him in two rows. He prayed one rakah with those nearest to him, then remained standing until the row behind them completed a rakah on their own. Then those in the back row moved forward and the front row stepped back. The Prophet ﷺ prayed a rakah with them, then sat until those who had fallen behind completed their rakah, and then he gave the closing salutation.

Abu Dawud 1237

Sahih

حدثنا عبيد الله بن معاذ حدثنا أبي حدثنا شعبة عن عبد الرحمن بن القاسم عن أبيه عن صالح بن خوات

عن سهل بن أبي حثمة

أن النبي ﷺ صلى بأصحابه في خوف فجعلهم خلفه صفين فصلى بالذين يلونه ركعة ثم قام فلم يزل قائما حتى صلى الذين خلفهم ركعة ثم تقدموا وتأخر الذين كانوا قدامهم فصلى بهم النبي ﷺ ركعة ثم قعد حتى صلى الذين تخلفوا ركعة ثم سلم

أبو داود 1237صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer while traveling
Chapter
Those who say one row stands with the imam and one row facing the enemy
Numbering
Darussalam 1237
Abu Dawud 1237