كتاب صلاة المسافرين وقصرها
6  
The Book of Prayer - Travellers
(57)
Chapter: The fear prayer
(57)
باب صَلاَةِ الْخَوْفِ ‏
Sahih Muslim 841

Sahl b. Abu Hathma reported that the Messenger of Allah (ﷺ) led his Companions in prayer in danger. He made them stand in two rows behind him. He led them who were close to him in one rak'ah. He then stood up and kept standing till those who were behind them observed one rak'ah. Then they (those standing in the second row) came in front and those who were in front went into the rear. He then led them In one rak'ah. He then sat down, till those who were behind him observed one rak'ah and then pronounced salutation.

حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُعَاذٍ الْعَنْبَرِيُّ، حَدَّثَنَا أَبِي، حَدَّثَنَا شُعْبَةُ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ، الْقَاسِمِ عَنْ أَبِيهِ، عَنْ صَالِحِ بْنِ خَوَّاتِ بْنِ جُبَيْرٍ، عَنْ سَهْلِ بْنِ أَبِي حَثْمَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم صَلَّى بِأَصْحَابِهِ فِي الْخَوْفِ فَصَفَّهُمْ خَلْفَهُ صَفَّيْنِ فَصَلَّى بِالَّذِينَ يَلُونَهُ رَكْعَةً ثُمَّ قَامَ فَلَمْ يَزَلْ قَائِمًا حَتَّى صَلَّى الَّذِينَ خَلْفَهُمْ رَكْعَةً ثُمَّ تَقَدَّمُوا وَتَأَخَّرَ الَّذِينَ كَانُوا قُدَّامَهُمْ فَصَلَّى بِهِمْ رَكْعَةً ثُمَّ قَعَدَ حَتَّى صَلَّى الَّذِينَ تَخَلَّفُوا رَكْعَةً ثُمَّ سَلَّمَ ‏.‏
Reference : Sahih Muslim 841
In-book reference : Book 6, Hadith 375
USC-MSA web (English) reference : Book 4, Hadith 1828
  (deprecated numbering scheme)