Earlier, David had defeated Edom. When Joab, the commander of David’s army, went into Edom to bury the dead, he killed all the males.