Sahl bin Abi Hathmah (may Allah be pleased with him) said: In the fear prayer, a group of his companions stands with the imam and the other group faces the enemy. The imam leads them in one rak'ah and those who are with the imam prostrate; then the imam stands up, and when the imam is standing upright he remains standing. Then they complete their second rak'ah, give the salam and leave, while the imam remains standing, and they go to face the enemy. Then those who have not prayed come; they say the takbir behind the imam, and the imam leads them in one rak'ah, then he gives the salam, and they stand up, complete the second rak'ah and give the salam.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الخوف / 6015