Solomon became the son-in-law of Pharaoh (the king of Egypt). After marrying Pharaoh's daughter, Solomon brought her to the City of David until he finished building his own house, the Lord's house, and the wall around Jerusalem.
Solomon responded, "You've shown great love to my father David, who was your servant. He lived in your presence with truth, righteousness, and commitment. And you continued to show him your great love by giving him a son to sit on his throne today.
Give me a heart that listens so that I can judge your people and tell the difference between good and evil. After all, who can judge this great people of yours?"
God replied, "You've asked for this and not for a long life, or riches for yourself, or the death of your enemies. Instead, you've asked for understanding so that you can do what is right.
Solomon woke up and realized it had been a dream. He went to Jerusalem and stood in front of the ark of the Lord's promise. He sacrificed burnt offerings and fellowship offerings and held a banquet for all his officials.
So she got up during the night and took my son, who was beside me, while I was asleep. She held him in her arms. Then she laid her dead son in my arms.
The other woman said, "No! My son is alive—your son is dead." The first woman kept on saying, "No! Your son is dead—my son is alive." So they argued in front of the king.
Then the woman whose son was still alive was deeply moved by her love for the child. She said to the king, "Please, sir, give her the living child. Please don't kill him!" But the other woman said, "He won't be mine or yours. Cut him {in two}."
All Israel heard about the decision the king made. They respected the king very highly, because they saw he possessed wisdom from God to do what was right.