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

It was narrated from Salim from his father, that: The Messenger of Allah (PBUH) 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. Translation Not Available

Book Ref: Sunan An Nisai Book 18 Hadith 1538
Web Ref:  Sunan An Nisai Vol 2 Book 18 Hadith 1539