WHEN David became old, his son Adonijah thought to reign in his stead; but the Lord had said that Solomon should sit upon the throne of David. So Solomon's mother, and Nathan the prophet went in, and told David that Adonijah was trying to make himself king. Then David ordered that Solomon should be anointed king, and that the trumpet should be blown, and that the people should shout, "God save king Solomon." So Solomon took the throne of his father David.

"Now the days of David drew nigh that he should die; and he charged Solomon his son, saying, I go the way of all the earth: be thou strong therefore, and show thyself a man; and keep the charge of the Lord thy God, to walk in his ways, to keep his statutes, and his commandments, and his judgments, and his testimonies, as it is written in the law of Moses, that thou mayest prosper in all that thou doest."

David also charged Solomon to destroy Joab and Shimei, but to be kind to the sons of Barzillai, for Barzillai had brought food to David when he fled from Absalom.

"And Solomon loved the Lord, walking in the statutes of David his father." And the king went to Gibeon to sacrifice there, and the Lord appeared to him in a dream by night, and said, "Ask what I shall give thee." Then Solomon answered, "Give thy servant an understanding heart to judge thy people, that I may discern between good and bad; for who is able to judge this thy so great a people?" And the speech pleased the Lord, and he said to Solomon, "Because thou hast asked this thing, and hast not asked for thyself long life, neither hast asked riches for thyself, nor hast asked the life of thine enemies; but hast asked for thyself understanding to discern judgment; behold, I have done according to thy words: lo, I have given thee a wise and an understanding heart; so that there was none like thee before thee, neither after thee shall any arise like unto thee. And I have also given thee that which thou hast not asked, both riches, and honor; so that there shall not be any among the kings like unto thee all thy days. And if thou wilt walk in my ways, to keep my statutes and my commandments, as thy father David did walk, then I will lengthen thy days."