Deuteronomy 20:16-20 - Laws Concerning War With Canaanite Nations

16 Only in the cities of these peoples that the Lord your God is giving you as an inheritance, you shall not leave alive anything that breathes. 17 But you shall utterly destroy them, the Hittite and the Amorite, the Canaanite and the Perizzite, the Hivite and the Jebusite, as the Lord your God has commanded you, 18 so that they may not teach you to do according to all their detestable things which they have done for their gods, so that you would sin against the Lord your God.

19 “When you besiege a city a long time, to make war against it in order to capture it, you shall not destroy its trees by swinging an axe against them; for you may eat from them, and you shall not cut them down. For is the tree of the field a man, that it should be besieged by you? 20 Only the trees which you know are not fruit trees you shall destroy and cut down, that you may construct siegeworks against the city that is making war with you until it falls.