Sayyiduna Ibn Umar (may Allah be pleased with them both) said: "I prayed the fear prayer (salat al-khawf) with the Prophet of Allah (peace and blessings be upon him). One group of us formed a row behind him (peace and blessings be upon him), and another group faced the enemy. He (peace and blessings be upon him) said the takbir, then led them in bowing and two prostrations; then the group that was with him turned away and faced the enemy, and the other group came and formed a row behind him. Then the Prophet of Allah (peace and blessings be upon him) said the salam, and every man from both groups stood up and completed one rak'ah and two prostrations for himself."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13210