Joab and all Israel stayed in Edom for six months. During that time they killed all of the men of Edom.
This is how it happened: Earlier David defeated Edom. Joab was the commander of David’s army. Joab went into Edom to bury dead people. Joab killed all the men still living there.
But at that time Hadad was only a young boy. So Hadad ran away to Egypt. Some of his father’s servants went with him.
The people of Israel fought the Midianites like the Lord had commanded. They killed all of the Midianite men.