Solomon loved God and continued to live in the God-honoring ways of David his father, except that he also worshiped at the local shrines, offering sacrifices and burning incense.
The king went to Gibeon, the most prestigious of the local shrines, to worship. He sacrificed a thousand Whole-Burnt-Offerings on that altar.
That night, there in Gibeon, God appeared to Solomon in a dream: God said, "What can I give you? Ask."
Solomon said, "You were extravagantly generous in love with David my father, and he lived faithfully in your presence, his relationships were just and his heart right. And you have persisted in this great and generous love by giving him - and this very day! - a son to sit on his throne.
"And now here I am: God, my God, you have made me, your servant, ruler of the kingdom in place of David my father. I'm too young for this, a mere child! I don't know the ropes, hardly know the 'ins' and 'outs' of this job.
And here I am, set down in the middle of the people you've chosen, a great people - far too many to ever count.
"Here's what I want: Give me a God-listening heart so I can lead your people well, discerning the difference between good and evil. For who on their own is capable of leading your glorious people?"
God, the Master, was delighted with Solomon's response.
And God said to him, "Because you have asked for this and haven't grasped after a long life, or riches, or the doom of your enemies, but you have asked for the ability to lead and govern well,
I'll give you what you've asked for - I'm giving you a wise and mature heart. There's never been one like you before; and there'll be no one after.
As a bonus, I'm giving you both the wealth and glory you didn't ask for - there's not a king anywhere who will come up to your mark.
And if you stay on course, keeping your eye on the life-map and the God-signs as your father David did, I'll also give you a long life."