In Gibeon the LORD appeared to Solomon in a dream by night and said, "Ask what I shall give you." Solomon said, "Thou hast showed to thy servant David my father great kindness. Now, O the LORD my God, thou hast made thy servant ruler in the place of David my father, although I am but a child who does not know how to go out or come in. Give thy servant, therefore, an understanding mind to rule thy people, that I may see clearly what is good and what is evil; for who is able to rule this thy great people?"
the LORD was pleased that Solomon had asked this; and God said to him, "Because you have asked this and have not asked for yourself long life nor riches nor the life of your enemies, but have asked for yourself understanding to see clearly what is just, I have now granted what you ask; I have given you a wise and understanding mind. I have also given you that which you have not asked, both riches and honor." When Solomon awoke, he found that it was a dream; and he returned to Jerusalem.
Once two women came to Solomon and stood before him. The one woman said, "Oh, my lord, this woman and I live in the same house. While with her in the house I had a child. Three days later this woman also had a child, and we were alone by ourselves in the house. While we two were alone this woman's child died in the night, because she lay upon it.
"Then she rose at midnight and took my son from beside me, while your servant slept, and laid it on her breast and laid her dead child on mine. When I rose at dawn to nurse my child, there it was dead; but when I looked at it closely in the morning, I found that it was not my son." Then the other woman said, "No; the living is my son, and the dead child is your son." So they quarrelled before Solomon.
Then Solomon said, "One says, 'This one who is alive is my son, and your son is dead.' But the other says, 'No; your son is dead, and my son is the one that is alive.' Bring me a sword." So they brought him a sword. Then he said, "Divide the living child in two and give half to the one and half to the other." At that the woman to whom the living child belonged spoke to Solomon—for she loved her son with all her heart—and said, "Oh, my lord, give her the living child and on no account put it to death." But the other said, "It shall be neither mine nor yours! divide it!" Then Solomon said, "Give the first woman the living child, and on no account put it to death; she is its mother."
When all Israel heard of the decision which Solomon had given, they had great respect for him, for they saw that he had divine wisdom to decide questions justly.