The Sword of Joshua
And they took it and struck it with the edge of the sword -- its king, all its cities, and all the people who [were] in it; he left none remaining, according to all that he had done to Eglon, but utterly destroyed it and all the people who [were] in it. (Josh 10:37)
References to war and killings in the Bible look extremely offensive to modern pacifists. Nevertheless, the God of the Bible Himself engages in war and killings as a way of executing justice and righteousness. Execution of justice involves employment of violent measures. The first human mass annihilation was through the Great Flood through which only Noah and those with him survived. Following that, human government was instituted so that "Whoever sheds man's blood, by man his blood shall be shed" (Gen.9:6), and a promise was given that the world will never be again destroyed by a global flood. However, the present world is reserved for judgment by fire (2Pet.3:7). Meanwhile, divine justice is locally executed by at least three different means: sword (war), plague (disease outbreaks), and famine (2 Sam. 24:13; 2Ch. 20:9; Jer. 11:22; 14:12,13; 15:2; 21:9; 24:10; 27:8,13; 29:17,18; 32:36; 34:17; 38:2; 42:17,22; 44:13; Eze. 6:11,12; 12:16). Ezekiel 5:17 adds also "wild beasts" to these.
The sword of Joshua against the Canaanites was judgment by means of sword. Jeremiah and Ezekiel prophesied that Israel itself (who was once used by God to bring justice by sword) would be punished by the sword, plague, and famine.
Jeremiah 24:10 - I will send the sword, famine and plague against them until they are destroyed from the land I gave to them and their ancestors.
Romans 13:3-4 For rulers are not a terror to good works, but to evil. Do you want to be unafraid of the authority? Do what is good, and you will have praise from the same. For he is God’s minister to you for good. But if you do evil, be afraid; for he does not bear the sword in vain; for he is God’s minister, an avenger to execute wrath on him who practices evil.