Solomon became the son-in-law of Pharaoh, Egypt’s king, when he married Pharaoh’s daughter. He brought her to David’s City until he finished building his royal palace, the Lord’s temple, and the wall around Jerusalem. 2 Unfortunately, the people were sacrificing at the shrines because a temple hadn’t yet been built for the Lord’s name in those days. 3 Now Solomon loved the Lord by walking in the laws of his father David, with the exception that he also sacrificed and burned incense at the shrines.
4 The king went to the great shrine at Gibeon in order to sacrifice there. He used to offer a thousand entirely burned offerings on that altar. 5 The Lord appeared to Solomon at Gibeon in a dream at night. God said, “Ask whatever you wish, and I’ll give it to you.”
6 Solomon responded, “You showed so much kindness to your servant my father David when he walked before you in truth, righteousness, and with a heart true to you. You’ve kept this great loyalty and kindness for him and have now given him a son to sit on his throne. 7 And now, Lord my God, you have made me, your servant, king in my father David’s place. But I’m young and inexperienced. I know next to nothing. 8 But I’m here, your servant, in the middle of the people you have chosen, a large population that can’t be numbered or counted due to its vast size. 9 Please give your servant a discerning mind in order to govern your people and to distinguish good from evil, because no one is able to govern this important people of yours without your help.”
10 It pleased the Lord that Solomon had made this request. 11 God said to him, “Because you have asked for this instead of requesting long life, wealth, or victory over your enemies—asking for discernment so as to acquire good judgment— 12 I will now do just what you said. Look, I hereby give you a wise and understanding mind. There has been no one like you before now, nor will there be anyone like you afterward. 13 I now also give you what you didn’t ask for: wealth and fame. There won’t be a king like you as long as you live. 14 And if you walk in my ways and obey my laws and commands, just as your father David did, then I will give you a very long life.”
15 Solomon awoke and realized it was a dream. He went to Jerusalem and stood before the chest containing the Lord’s covenant. Then he offered entirely burned offerings and well-being sacrifices, and held a celebration for all his servants. (Common English Bible)