Now the LORD raised up an adversary against Solomon, Hadad the Edomite; he was a descendant of the king in Edom. For it happened, when David was in Edom, and Joab the commander of the army had gone up to bury the slain, after he had killed every male in Edom (because for six months Joab remained there with all Israel, until he had cut down every male in Edom), that Hadad fled to go to Egypt, he and certain Edomites of his father's servants with him.