Israel's enemies within the Promised Land had only two choices: run or die. Israel was not to take captives from them or spare anyone. God owns all things, including nations. He gets to decide who lives and dies. The Hittites, Amorites, Perizzites, etc., had adopted such abhorrent religious practices that God said even the infants and animals must die.
Deuteronomy 20:18
However, even in combat, one must be always cognizant of God's Law and one's own behavior. Just war executed according to God's commandments is never "anything goes". Victory is predicated on obedience.
#deuteronomy 20-21 #torah #shoftim