1 As David’s time to die drew near, he charged Solomon his son, saying, 2 “I am going the way of all the earth. Be strong, therefore, and show yourself a man. 3 Keep the charge of the Lord your God, to walk in His ways, to keep His statutes, His commandments, His ordinances, and His testimonies, according to what is written in the Law of Moses, that you may succeed in all that you do and wherever you turn, 4 so that the Lord may carry out His promise which He spoke concerning me, saying, ‘If your sons are careful of their way, to walk before Me in truth with all their heart and with all their soul, you shall not lack a man on the throne of Israel.’
5 “Now you also know what Joab the son of Zeruiah did to me, what he did to the two commanders of the armies of Israel, to Abner the son of Ner, and to Amasa the son of Jether, whom he killed; he also shed the blood of war in peace. And he put the blood of war on his belt about his waist, and on his sandals on his feet. 6 So act according to your wisdom, and do not let his gray hair go down to Sheol in peace.
7 But show kindness to the sons of Barzillai the Gileadite, and let them be among those who eat at your table; for they assisted me when I fled from Absalom your brother.
8 Behold, there is with you Shimei the son of Gera the Benjamite, of Bahurim; now it was he who cursed me with a violent curse on the day I went to Mahanaim. But when he came down to me at the Jordan, I swore to him by the Lord, saying, ‘I will not put you to death with the sword.’ 9 Now therefore, do not let him go unpunished, for you are a wise man; and you will know what you ought to do to him, and you will bring his gray hair down to Sheol with blood.”
10 Then David slept with his fathers and was buried in the city of David. 11 The days that David reigned over Israel were forty years: seven years he reigned in Hebron and thirty-three years he reigned in Jerusalem. 12 And Solomon sat on the throne of David his father, and his kingdom was firmly established.