Sahih Bukhari – Hadith No : 4181

Narrated Sahl bin Abi Hathma: (describing the Fear prayer): The Imam stands up facing the Qibla and one batch of them (i.e. the army) (out of the two) prays along with him and the other batch faces the enemy. The Imam offers one rak`a with the first batch they themselves stand up alone and offer one bowing and two prostrations while they are still in their place, and then go away to relieve the second batch, and the second batch comes (and takes the place of the first batch in the prayer behind the Imam) and he offers the second rak`a with them. So he completes his two-rak`at and then the second batch bows and prostrates two prostrations (i.e. complete their second rak`a and thus all complete their prayer).

Hadith In Arabic Text :

حدثنا مسدد، حدثنا يحيى بن سعيد القطان، عن يحيى بن سعيد الأنصاري، عن القاسم بن محمد، عن صالح بن خوات، عن سهل بن أبي حثمة، قال يقوم الإمام مستقبل القبلة، وطائفة منهم معه وطائفة من قبل العدو، وجوههم إلى العدو، فيصلي بالذين معه ركعة، ثم يقومون، فيركعون لأنفسهم ركعة ويسجدون سجدتين في مكانهم، ثم يذهب هؤلاء إلى مقام أولئك فيركع بهم ركعة، فله ثنتان، ثم يركعون ويسجدون سجدتين‏.‏

Chapter : Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi) – كتاب المغازى