Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) said: I went on a campaign with the Prophet (peace and blessings be upon him) towards Najd. We met the enemy and formed ranks against them. Then the Prophet (peace and blessings be upon him) stood and led us in prayer. One group stood with the Prophet (peace and blessings be upon him) and the other group faced the enemy. The Messenger of Allah (peace and blessings be upon him) bowed and led those who were with him (peace and blessings be upon him) in one rak'ah with two prostrations. Then they turned away and went to the place of those who had not prayed, and the group that had not prayed came. Then he (peace and blessings be upon him) led them in one rak'ah. Then the Messenger of Allah (peace and blessings be upon him) gave the salam, and every man stood up and performed one bowing and two prostrations by himself.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الخوف / 6039