Sunan an-Nasa'i, Book 18, Hadith 10 (In-Book) ⓘ
It was narrated from Salim from his father, that: The Messenger of Allah led one of the two groups in praying one rak'ah while the other group was facing the enemy, then they moved away and took the place of the others, and the others came and he led them in praying the other rak'ah, then he said the salam and they stood up and made up the other rak'ah, and the others stood up and made up the other rak'ah.
أَخْبَرَنَا إِسْمَاعِيلُ بْنُ مَسْعُودٍ، عَنْ يَزِيدَ بْنِ زُرَيْعٍ، قَالَ حَدَّثَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمٍ، عَنْ أَبِيهِ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم صَلَّى بِإِحْدَى الطَّائِفَتَيْنِ رَكْعَةً وَالطَّائِفَةُ الأُخْرَى مُوَاجِهَةُ الْعَدُوِّ ثُمَّ انْطَلَقُوا فَقَامُوا فِي مَقَامِ أُولَئِكَ وَجَاءَ أُولَئِكَ فَصَلَّى بِهِمْ رَكْعَةً أُخْرَى ثُمَّ سَلَّمَ عَلَيْهِمْ فَقَامَ هَؤُلاَءِ فَقَضُوا رَكْعَتَهُمْ وَقَامَ هَؤُلاَءِ فَقَضُوا رَكْعَتَهُمْ .
also referenced under: Hadith 1538 (Reference) & Volume 2, Book 18, Hadith 1539 (DarusSalam)