from bowing and we all raised ours. He then went down to prostrate along with the row directly behind him, while the rear row remained standing, facing the enemy. When the Prophet ﷺ finished the prostration and the row with him had risen, the rear row went down and prostrated; then they stood up. The rear row now advanced to the front and the front row fell back. He bowed again and we all bowed with him; he raised his head from bowing and we all raised ours. Next he went down to prostrate with the row that was now behind him—the same row that had been at the rear in the first rakʿah (unit of prayer)—while the rear row stood facing the enemy. When the Prophet ﷺ completed the prostration and the row with him had risen, the rear row went down and prostrated; when they had finished, the Prophet ﷺ pronounced the taslīm (final salutation of peace) and we all pronounced it together.” Narrated by Muslim.
Among the recognized formats of the Prayer of Fear is the version Ibn ʿUmar narrated: “In the Prayer of Fear the Prophet ﷺ stood with one of the two parties for one rakʿah and two prostrations while the other party faced the enemy. Those who had prayed then withdrew and took the place of their companions, turning to face the enemy, and the others came forward; he led them in one rakʿah, then gave the taslīm. After that, the first group completed one rakʿah and the second group likewise completed one rakʿah.” Agreed upon.
Another permissible format of the Prayer of Fear is that he would lead each party in a complete prayer and end with the taslīm for each of them. Reported by Aḥmad, Abū Dāwūd, and al-Nasāʾī.