The moment soldiers enter a war, there is a mitzva to strengthen their faith and rely upon the Lord, God of Israel. They should be aware they are fighting to save God’s people, the Jews. When they enter a battle, they should not be afraid at all, but confident God will help him emerge victorious. The soul of a Jewish soldier killed in war is bound in the bond of eternal life, in heaven, together with the most righteous people.
In biblical times, to encourage the soldiers, the priests and Levites went to war with them, carrying an ark containing a Torah scroll. There was also a mitzva for the priest to blow silver trumpets to strengthen faith. There was even a specially anointed priest who would give the soldiers a motivational talk: “Hear, O Israel! You are about to join battle with your enemy. Let not your courage falter. Do not be in fear, panic, or dread of them. For it is the Lord your God who marches with you to do battle for you against your enemy, to bring you victory” (Deuteronomy 20:3-4). At the same time, the police (who were generally Levites) were instructed to exempt certain people from the army if there were extenuating circumstances, and to punish deserters if there were not. Nowadays, the military's rabbinate, adjutancy, and police carry out these functions in the Israeli army.