Sunan Abi Dawud Book 4, Hadith 48
The Prophet of Allah (ﷺ) uttered takbir and both rows uttered takbir together.
Abu Dawud said: This tradition has been narrated by al-Thawri to the same effect on the authority of Khusaif. 'Abd al-Rahman b. Samurah also prayed in like manner. But the section which he (the Prophet) led in one rak'ah and then uttered the salutation and went and took the place of their companions. They came and prayed one rak'ah by themselves. Then they returned to their place and they prayed (one rak'ah) by themselves.
Abu Dawud said: Muslim b. Ibrahim reported from 'Abd al-Samad b. Habib on the authority of his father that they had fought a battle at Kabul along with 'Abd al-Rahman b. Samurah. He led us in prayer in time of danger.
The Messenger of Allah (ﷺ) led us in prayer in the time of danger. They (the people) stood in two rows. One row was behind the Messenger of Allah (ﷺ) and the other faced the enemy. The Messenger of Allah (ﷺ) led them in one rak'ah,and then the other section came and took their place; they went and faced the enemy. The Prophet (ﷺ) led them in one rak'ah and uttered the salutation. They stood up and prayed the second rak'ah by themselves and uttered the salutation and went away; they took the place of the other section facing the enemy. They came back and took their place. They prayed one rak'ah by themselves and then uttered the salutation.
Tha'labah ibn Zahdam said: We accompanied Sa'd ibn al-'As at Tabaristan. He stood and said: Which of you prayed along with the Messenger of Allah (ﷺ) in time of danger? Hudhayfah said: I then he led one section in one rak'ah and the other section in one rak'ah. They did not pray the second rak'ah by themselves.
Abu Dawud: This tradition has been transmitted by 'Ubaid Allah b. 'Abd Allah and Mujahid on the authority of Ibn 'Abbas from the Prophet (ﷺ) in like manner. This has also been narrated by 'Abd Allah b. Shaqiq from Abu Hurairah from the Prophet (ﷺ). Yazid al-Faqir and Abu Musa also narrated this tradition from Jabir from the Prophet (ﷺ). Some of the narrators said in the version narrated by Yazid al-Faqir that they completed their second rak'ah. This has also been narrated by Simak al-Hanafi on the authority of Ibn 'Umar from the Prophet (ﷺ) something similar. Zaid b. Thabit also narrated from the Prophet (ﷺ) in like manner. This version adds: The people prayed on rak'ah and the Prophet (ﷺ) prayed two rak'ahs.