For six months Joab and the entire Israelite army stayed there until they had exterminated every male in Edom.
During David’s campaign against Edom, Joab, the commander of the army, while on a mission to bury the dead, killed every male in Edom.
Hadad, who was only a small boy at the time, escaped with some of his father’s Edomite servants and headed for Egypt.
They fought against the Midianites, as the Lord commanded Moses, and they killed every male.