Chapter: The Prayer of Fear
When danger is acute, the imam divides the worshipers into two groups: one faces the enemy while the other stands behind him. He leads the group with him in a single rakʿah that includes its two prostrations. When he lifts his head from the second prostration, that group moves forward to confront the enemy and the other group takes its place. The imam then leads this second group in one rakʿah with its two prostrations, sits for the tashahhud, and ends with the salām, while they themselves do not yet give the salām. They then go to face the enemy, and the first group returns. Each member of the first group now completes—individually—one rakʿah with its two prostrations, without recitation, then sits for the tashahhud, gives the salām, and heads back to the front. The second group then comes back, performs one rakʿah with its two prostrations, this time with recitation, sits for the tashahhud, and concludes with the salām.
If the imam is resident (not traveling), he prays two rakʿahs with the first group and two with the second; for the Maghrib prayer, he prays two rakʿahs with the first group and one with the second.
They must not engage in combat while actually praying; if they do, their prayer becomes invalid. If the fear becomes extreme, they may pray mounted and individually, merely indicating the bowing and prostration with head gestures, facing whatever direction they are able, when they cannot turn toward the qiblah.