Years before, David had defeated Edom. Joab, his army commander, had stayed to bury some of the Israelite soldiers who had died in battle. While there, they killed every male in Edom.