After King David died, his son Solomon became the next ruler and was tasked with building a temple for the Lord. God appeared to Solomon in a dream and offered him anything he wanted; Solomon asked for a heart of wisdom to lead the people and discern good from evil. God was so pleased with this unselfish request that He granted him unmatched wisdom as well as riches and favor that he did not ask for.