1The days of David drew near for him to die, and he commanded his son Solomon, saying,2I am going in the way of all the earth; so be strong and become a man.3Keep the charge of the LORD your God by walking in his ways, by keeping his statutes, his commandments, his judgments, and his testimonies, as it is written in the instruction of Moses, so that you may act prudently in all that you do and in all to which you turn.4The LORD will thereby establish his word that he spoke concerning me, saying, If your sons keep their way by walking before me in faithfulness with all their heart and with all their soul, then no man of yours shall be cut off from the throne of Israel.5You also know what Joab son of Zeruiah did to me, what he did to the two commanders of the armies of Israel, to Abner son of Ner and to Amasa son of Jether, when he killed them and placed the blood of war upon peace and put the blood of war upon his belt that was on his loins and upon his sandal that was on his feet.6Act according to your wisdom, and do not let his grey head go down to Sheol in peace.7Show kindness to the sons of Barzillai the Gileadite, and let them be among those who eat at your table, for thus they came near to me when I fled from the presence of your brother Absalom.8Behold, Shimei son of Gera, son of the Benjaminite from Bahurim, is with you; he cursed me with a grievous curse on the day I went to Mahanaim, and he came down to meet me at the Jordan, and I swore to him by the LORD, saying, 'If I put you to death by the sword.'9Now do not acquit him, for you are a wise man and you know what you must do to him; bring his grey head down to Sheol in blood.10David lay down with his fathers and was buried in the city of David.11David reigned over Israel for forty years: seven years in Hebron and thirty-three years in Jerusalem.12Solomon sat on the throne of David his father, and his kingdom was firmly established.