Joshua recounts the conquest of Canaan by the children of Israel. Throughout the conquest narrative, the repeated refrain is that the Israelites struck their enemies “with the edge of the sword” (6:21, 8:24, 11:10). Of course, God tells the children of Israel at the end of the book that “it was not by your sword or your bow” that their enemies were driven out, but by the Lord (24:12)– this is why the man Joshua saw in chapter 5 had a drawn sword. Nevertheless, the Israelites fought and killed their enemies with the sword.
The first “swords” drawn in Canaan, however, were not drawn against Israel’s enemies, nor was blood first spilled in battle. In Joshua 4, after Israel had crossed the Jordan, the new generation was circumcised with flint “swords” (usually translated “knives”). Before passing divine judgment on the Canaanites, Israel had to be made holy– they made war on their own flesh.