Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) said: I was present with the Prophet (peace and blessings be upon him) at the fear prayer. He (peace and blessings be upon him) ordered a group to stand facing the enemy, and he (peace and blessings be upon him) stood and led a group in one rak'ah. Then those who had prayed with the Prophet (peace and blessings be upon him) went to the others' place, and those stood behind the Prophet (peace and blessings be upon him). He (peace and blessings be upon him) led them in one rak'ah. When they had made the prostrations, he sat and gave the salam with them. The Messenger of Allah (peace and blessings be upon him) had two rak'ahs and those behind him (peace and blessings be upon him) one rak'ah each; when those who were behind him (peace and blessings be upon him) gave the salam, the others gave the salam as well.
Note: That he (peace and blessings be upon him) had two rak'ahs and those behind him one rak'ah each may also come from some of the narrators, whereas other narrations state that they completed their own rak'ah afterwards.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الخوف / 6051