Joab and all the Israelites stayed in Edom for six months and killed every male in Edom.
They fought the Midianites as the Lord had commanded Moses, and they killed every Midianite man.
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.
At that time Hadad was only a young boy, so he ran away to Egypt with some of his father’s officers.