15 For it came to pass, when David was in Edom, and Joab the captain of the host was gone up to bury the slain, after he had smitten every male in Edom;

16 (For six months did Joab remain there with all Israel, until he had cut off every male in Edom:)

17 That Hadad fled, he and certain Edomites of his father's servants with him, to go into Egypt; Hadad being yet a little child.