The group that first begins the prayer with the Imam gives salam after its initial unit or units and then goes to face the enemy.

The Fear Prayer: Method and Rulings for the Two Groups