After King David died, his son Solomon became king over Israel. God appeared to Solomon in a dream one night and said, "Ask! What would you like for me to give you?"
Now Solomon could have asked for riches, long life, or victory over his enemies, but he did not ask for any of these things. He said, "Give me an understanding heart to rule Your people, that I may know the difference between good and evil. Help me to judge these great people of Yours."
God did give him the wisdom he asked for, and gave him the other things also: riches, long life, and victory over his enemies.
Solomon knew about many, things! He could talk about trees and animals, birds and fish. He knew things that other people didn't know, and people came from all over the world to hear him speak. Once a queen came from Sheba to hear him. She was amazed at what she saw and heard.
One day two women brought a baby to Solomon. Each woman said the baby was her child. Solomon said, "Cut the baby in half and give half of the baby to each woman." (Of course, he didn't really intend to kill the baby. It was just a test.) "NO!" screamed the real mother, "Give her the baby. Do not kill him." Then Solomon knew who the real mother was because of the way she loved the baby. He gave the baby to its real mother.
God allowed Solomon to build a beautiful temple in which people could worship God.
Solomon made a big mistake in marrying women from the countries around him. These wives worshiped idols and Solomon also began to worship the false gods. He was not loyal to God as his father David had been.