He had warned Solomon specifically about worshiping other gods, but Solomon did not listen to the LORD's command.
So now the LORD said to him, "Since you have not kept my covenant and have disobeyed my laws, I will surely tear the kingdom away from you and give it to one of your servants.
But for the sake of your father, David, I will not do this while you are still alive. I will take the kingdom away from your son.
And even so, I will let him be king of one tribe, for the sake of my servant David and for the sake of Jerusalem, my chosen city."
Then the LORD raised up Hadad the Edomite, a member of Edom's royal family, to be an enemy against Solomon.
Years before, David had gone to Edom with Joab, his army commander, to bury some Israelites who had died in battle. While there, the Israelite army had killed nearly every male in Edom.
Joab and the army had stayed there for six months, killing them.
But Hadad and a few of his father's royal officials had fled. (Hadad was a very small child at the time.)
They escaped from Midian and went to Paran, where others joined them. Then they traveled to Egypt and went to Pharaoh, who gave them a home, food, and some land.
Pharaoh grew very fond of Hadad, and he gave him a wife -- the sister of Queen Tahpenes.
She bore him a son, Genubath, who was brought up in Pharaoh's palace among Pharaoh's own sons.