It was not possible to separate warfare from religion. The connection of the two was evident in many aspects of military practice. To the Jews, God was the Lord of Hosts who went before them into battle (Exo 15:3; Judg 4:14; 1 Sam 17:45; Isaiah 42:13). There was a sacred “Book of the Wars of the Lord” (Num 21:14). Before going to war, the men had to keep themselves ritually clean, not even engaging in sexual relationships (2 Sam 11:11). Health laws were involved in the commandments concerning ceremonial uncleanliness, but there were other laws in operation as well as those (Deut 13:13-14).
A military campaign commenced with an act of worship (1 Kings 8:44) and a response from members of the armed forces (Psa 20). Prophets told the army commander exactly what he was to do (1 Kings 20:13-30) and the outcome of the battle (Judges 20:27-28), and they gave advice when it was needed (2 Kings 6:8-10). The war cry was a spiritual one (Judges 7:18).
Victory was understood as being God’s and everything taken in battle belonged to God. It was given to God by burning or by death, as cities were put “under the curse” or “under the ban,” terms indicating a ritual giving to God. Any person breaking the curse became curse (Joshua 7). God did not always take everything; there were occasions when he allowed the sharing of booty (Joshua 8:27); neither did he always seek the death of a population. His decree concerning a people depended upon the degree of their wickedness (Gen 15:16). The holiness of the campaign was such that if the Jews turned against God, then God would use others to put the Jews themselves “under the ban” (Isaiah 10:5-6; Habakkuk 1:5-11) and would even fight against his own people (Jer 21:5-7).