Sahih Muslim , Hadith 839

Salim b. Abdullah b. 'Umar reported: The Messenger of Allah (may peace he upon him) led on* of the two groups In one rak'ah of prayer in danger, while the other group faced the -enemy. Then they (the members of the first group) went back and replaced their companions who were facing the enemy. and then they (the members of the second group) came and the Messenger of Allah led them in one rak'ah of prayer. Then the Messenger of Allah pronounced salutation, and then they (the members of the Ant group) completed the rak'ah and they (the members of the second group) completed the rak'ah.

حَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ، أَخْبَرَنَا عَبْدُ الرَّزَّاقِ، أَخْبَرَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمٍ، عَنِ ابْنِ عُمَرَ، قَالَ صَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم صَلاَةَ الْخَوْفِ بِإِحْدَى الطَّائِفَتَيْنِ رَكْعَةً وَالطَّائِفَةُ الأُخْرَى مُوَاجِهَةُ الْعَدُوِّ ثُمَّ انْصَرَفُوا وَقَامُوا فِي مَقَامِ أَصْحَابِهِمْ مُقْبِلِينَ عَلَى الْعَدُوِّ وَجَاءَ أُولَئِكَ ثُمَّ صَلَّى بِهِمُ النَّبِيُّ صلى الله عليه وسلم رَكْعَةً ثُمَّ سَلَّمَ النَّبِيُّ صلى الله عليه وسلم ثُمَّ قَضَى هَؤُلاَءِ رَكْعَةً وَهَؤُلاَءِ رَكْعَةً ‏.‏

sunnah.com

This hadith has been narrated by another chain of transmitters.

وَحَدَّثَنِيهِ أَبُو الرَّبِيعِ الزَّهْرَانِيُّ، حَدَّثَنَا فُلَيْحٌ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمِ بْنِ عَبْدِ اللَّهِ، بْنِ عُمَرَ عَنْ أَبِيهِ، أَنَّهُ كَانَ يُحَدِّثُ عَنْ صَلاَةِ، رَسُولِ اللَّهِ صلى الله عليه وسلم فِي الْخَوْفِ وَيَقُولُ صَلَّيْتُهَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم ‏.‏ بِهَذَا الْمَعْنَى ‏.‏

sunnah.com

Ibn Umar reported that the Messenger of Allah observed prayer in danger on some day (in this way): a group stood with him (the Holy Prophet) (for prayer) and the other group stood In front of the enemy. Then those who were with (him) observed one rak'ah of prayer and they went back and the others came and they observed one rak'ah (with him). Then both the groups completed one rak'ah each. Ibn Umar said: When there is greater danger, then observe prayer even on the ride or with the help of gestures in a standing posture.

وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا يَحْيَى بْنُ آدَمَ، عَنْ سُفْيَانَ، عَنْ مُوسَى بْنِ، عُقْبَةَ عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، قَالَ صَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم صَلاَةَ الْخَوْفِ فِي بَعْضِ أَيَّامِهِ فَقَامَتْ طَائِفَةٌ مَعَهُ وَطَائِفَةٌ بِإِزَاءِ الْعَدُوِّ فَصَلَّى بِالَّذِينَ مَعَهُ رَكْعَةً ثُمَّ ذَهَبُوا وَجَاءَ الآخَرُونَ فَصَلَّى بِهِمْ رَكْعَةً ثُمَّ قَضَتِ الطَّائِفَتَانِ رَكْعَةً رَكْعَةً - قَالَ - وَقَالَ ابْنُ عُمَرَ فَإِذَا كَانَ خَوْفٌ أَكْثَرَ مِنْ ذَلِكَ فَصَلِّ رَاكِبًا أَوْ قَائِمًا تُومِئُ إِيمَاءً ‏.‏

sunnah.com