2
As the day of David's death approached, he commanded Solomon his son, saying, “I am going the way of all the earth. Be strong, therefore, and show yourself a man. Keep the commands of Yahweh your God to walk in his ways, to obey his statutes, his commandments, his decisions, and his covenant decrees, being careful to do what is written in the law of Moses, so you may prosper in all you do, wherever you go, so that Yahweh may fulfill his word which he spoke concerning me, saying, 'If your sons carefully watch their conduct, to walk before me faithfully with all their heart and with all their soul, you will never cease to have a man on the throne of Israel.' You know also what Joab son of Zeruiah did to me, and what he did to the two commanders of the armies of Israel, to Abner son of Ner, and to Amasa son of Jether, whom he killed. He shed the blood of war in peace and put the blood of war on the belt around his waist and on the shoes on his feet. Deal with Joab by the wisdom you have learned, but do not let his gray head go down to the grave in peace. However, show kindness to the sons of Barzillai the Gileadite, and let them be among those who eat at your table, for they came to me when I fled from Absalom your brother. Look, there is with you Shimei son of Gera, the Benjamite of Bahurim, who cursed me with a violent curse on the day I went to Mahanaim. Shimei came down to meet me at the Jordan, and I swore to him by Yahweh, saying, 'I will not put you to death with the sword.' Now therefore do not let him go free from punishment. You are a wise man, and you will know what you ought to do to him. You will bring his gray head down to the grave with blood.”
10 Then David slept with his ancestors and was buried in the city of David. 11 The days that David reigned over Israel were forty years. He had reigned for seven years in Hebron and for thirty-three years in Jerusalem. 12 Then Solomon sat on the throne of his father David, and his rule was firmly established.
13 Then Adonijah son of Haggith came to Bathsheba the mother of Solomon. She said, “Do you come peacefully?” He replied, “Peacefully.” 14 Then he said, “I have something to say to you.” So she replied, “Speak.” 15 Adonijah said, “You know that the kingdom was mine, and that all Israel expected me to be king. But things changed, and the kingdom was given to my brother, for it was his from Yahweh. 16 Now I have one request of you, and do not turn away from my face.” Bathsheba said to him, “Speak.” 17 He said, “Please speak to Solomon the king, for he will not turn away from your face, so that he may give me Abishag the Shunammite as my wife.” 18 Bathsheba said, “Very well, I will speak to the king.”
19 Bathsheba therefore went to King Solomon to speak to him for Adonijah. The king rose to meet her and bowed down to her. Then he sat down on his throne and had a throne brought for the king's mother. She sat at his right hand. 20 Then she said, “I wish to ask one small request of you, for you will not turn away from my face.” The king answered her, “Ask, my mother, for I will not turn away from your face.” 21 She said, “Let Abishag the Shunammite be given to Adonijah your brother as his wife.” 22 King Solomon answered and said to his mother, “Why do you ask Abishag the Shunammite for Adonijah? Why do you not ask the kingdom for him also, for he is my elder brother—for him, for Abiathar the priest, and for Joab son of Zeruiah?” 23 Then King Solomon swore by Yahweh, saying, “May God do so to me, and more also, if Adonijah has not spoken this word against his own life. 24 Now therefore as Yahweh lives, who has established me and set me on the throne of David my father, and who has made me a house as he promised, surely Adonijah will be put to death today.” 25 So King Solomon sent Benaiah son of Jehoiada, and Benaiah found Adonijah and put him to death.
26 Then to Abiathar the priest the king said, “Go to Anathoth, to your own fields. You are worthy of death, but I will not at this time put you to death, because you carried the ark of the Lord Yahweh before David my father and suffered in every way my father suffered.” *Some versions have, the ark of Yahweh . 27 So Solomon dismissed Abiathar from being priest to Yahweh, that he might fulfill the word of Yahweh, which he had spoken concerning the house of Eli at Shiloh.
28 The news came to Joab, for Joab had supported Adonijah, though he had not supported Absalom. So Joab fled to the tent of Yahweh and took hold of the horns of the altar. 29 It was told King Solomon that Joab had fled to the tent of Yahweh and was now beside the altar. Then Solomon sent Benaiah son of Jehoiada, saying, “Go, execute him.” 30 So Benaiah came to the tent of Yahweh and said to him, “The king says, 'Come out.'” Joab replied, “No, I will die here.” So Benaiah returned to the king, saying, “Joab said he wanted to die at the altar.” 31 The king said to him, “Do as he has said. Kill him and bury him so that you may take away from me and from my father's house the blood that Joab shed without cause. 32 May Yahweh return his blood on his own head, because he attacked two men more righteous and better than himself and killed them with the sword, Abner son of Ner, the captain of the army of Israel, and Amasa son of Jether, the captain of the army of Judah, without my father David knowing it. 33 So may their blood return on the head of Joab and on the head of his descendants forever. But to David and his descendants, and to his house, and to his throne, may there be peace forever from Yahweh.” 34 Then Benaiah son of Jehoiada went up and attacked Joab and killed him. He was buried in his own house in the wilderness. 35 The king put Benaiah son of Jehoiada over the army in his place, and he put Zadok the priest in Abiathar's place.
36 Then the king sent and called for Shimei, and said to him, “Build yourself a house in Jerusalem and live there, and do not go out from there to any other place. 37 For on the day you go out, and pass over the Kidron Valley, know you for certain that you will surely die. Your blood will be on your own head.” 38 So Shimei said to the king, “What you say is good. As my master the king has said, so your servant will do.” So Shimei lived in Jerusalem for many days.
39 But at the end of three years, two of the servants of Shimei ran away to Achish son of Maacah, the king of Gath. So they told Shimei, saying, “See, your servants are in Gath.” 40 Then Shimei arose, saddled his donkey and went to Achish in Gath to seek his servants. He went and brought his servants back from Gath. 41 When Solomon was told that Shimei had gone from Jerusalem to Gath and had returned, 42 the king sent and called for Shimei and said to him, “Did I not make you swear by Yahweh and testify to you, saying, 'Know for certain that on the day you go out and go to any other place, you will surely die'? Then you said to me, 'What you say is good.' 43 Why then have you not kept your oath to Yahweh and the command that I gave you?” 44 The king also said to Shimei, “You know in your heart all the wickedness that you did to my father David. Therefore Yahweh will return your wickedness on your own head. 45 But King Solomon will be blessed and the throne of David will be established before Yahweh forever.” 46 Then the king gave a command to Benaiah son of Jehoiada. He went out and put Shimei to death.
So the rule was well established in Solomon's hand.

*2:26 Some versions have, the ark of Yahweh .