Sunan an-Nasa'i, Volume 2, Book 18, Hadith 1547 (DarusSalam)

Jabir bin Abdullah said: "We were with the Messenger of Allah and the Iqamah for prayer was said. The Messenger of Allah stood up and one group stood behind him while another group faced the enemy. He led those who were behind him in prayer, bowing once and prostrating twice. Then they went and took the place of those who had been facing the enemy, and that group came and the Messenger of Allah led them in prayer, bowing once and prostrating twice. Then the Messenger of Allah said the taslim and those who were behind him said the taslim, as did the other group."

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

sunnah.com