Thank you for contacting BibleAsk.
To kill and to murder are two different things. Murder is “the premeditated, unlawful taking of a life,” whereas killing is, more generally, “the taking of a life.” The misconception that “killing” and “murder” are synonymous is partially based on the King James mistranslation of the sixth commandment, which reads, “Thou shalt not kill” (Exodus 20:13). However, the word kill is a translation of the Hebrew word ratsach, which nearly always refers to intentional killing without cause. The correct meaning of this word is “murder,” and modern translations render the command as “You shall not murder.” The Bible in Basic English should say: “Do not put anyone to death without cause.” Also, the same Law that forbids murder permits killing in self-defense (Exodus 22:2).
During the conquest of Canaan, God commanded the destruction of entire cities and nations: “But of the cities of these peoples which the LORD your God gives you as an inheritance, you shall let nothing that breathes remain alive, but you shall utterly destroy them: the Hittite and the Amorite and the Canaanite and the Perizzite and the Hivite and the Jebusite, just as the LORD your God has commanded you” (Deuteronomy 20:16-17). And Joshua did what God had told him (Joshua 10:40).
Why did God give such a command? Israel was God’s instrument of judgment against the heathen Canaanites, who were exceedingly evil “Every abomination to the LORD which He hates they have done to their gods; for they burn even their sons and daughters in the fire to their gods” (Deuteronomy 12:31). Their destruction was commanded to protect Israel “Lest they teach you to do according to all their abominations which they have done for their gods, and you sin against the LORD your God” (Deuteronomy 20:18 also Deuteronomy 12:29-30).
When cancer plagues the body, the affected area has to be cut off otherwise the sickness will spread and destroy the whole body. Likewise, God in His mercy was protecting Israel from these evil nations that threatened their existence.
However, God’s judgments were mixed with mercy. For example, when God was about to destroy Sodom and Gomorrah, God promised Abraham that He would spare the whole city in order to save ten righteous people there. Sadly, ten righteous people could not be found. And God saved the “righteous Lot” and his family (Genesis 18:32; Genesis 19:15; 2 Peter 2:7). Later, God destroyed Jericho, but He saved Rahab the harlot and her family in response to Rahab’s faith (Joshua 6:25; Hebrews 11:31). Until the final judgment, God will consistently deal mercifully with all that seek Him.
In His service,