Now the news reached Joab, for Joab had supported and followed Adonijah, although he had not followed Absalom. So Joab fled to the [sacred] tent of the LORD and took hold of the horns of the altar [to seek asylum]. King Solomon was told that Joab had fled to the tent of the LORD and was at that moment beside the altar. Then Solomon sent Benaiah the son of Jehoiada, saying, “Go, strike him down.” So Benaiah came to the tent of the LORD and told Joab, “This is what the king commands, ‘Come out of there.’ ” But Joab said, “No, for I will die here.” Then Benaiah brought word to the king again, saying, “This is what Joab said, and this is how he answered me.” The king said to him, “Do as he has said. Strike him down and bury him, so that you may remove from me and from my father’s house the innocent blood which Joab shed. The LORD will return his bloody deeds upon his own head, because he struck down two men more righteous and honorable than he and killed them with the sword, without my father David knowing: Abner the son of Ner, commander of the army of Israel, and Amasa the son of Jether, commander of the army of Judah. So shall their blood return on the head of Joab and the heads of his descendants forever. But for David, his descendants, his house, and his throne, may there be peace from the LORD forever.” So Benaiah the son of Jehoiada went up [to the tabernacle] and struck and killed Joab, and he was buried at his own house in the wilderness [of Judah]. The king appointed Benaiah the son of Jehoiada over the army in Joab’s place, and appointed Zadok the priest in place of Abiathar.
Now the king sent word and called for Shimei and said to him, “Build yourself a house in Jerusalem and live there. Do not go from there to any other place. For on the day you leave and cross over the Brook Kidron, know for certain that you shall surely die; your blood shall be on your own head.” Shimei said to the king, “The word (ruling) is good. As my lord the king has said, so will your servant do.” So Shimei lived in Jerusalem for many days.
But it happened after three years, that two of Shimei’s servants ran away to Achish the son of Maacah, the king of Gath. And Shimei was told, “Behold, your [runaway] servants are in Gath.” So Shimei arose, saddled his donkey, and went to Gath to [King] Achish to look for his servants. And Shimei went and brought them back from Gath. Now Solomon was told that Shimei had gone from Jerusalem to Gath, and had returned. So the king sent word and called for Shimei and said to him, “Did I not make you swear by the LORD and solemnly warn you, saying, ‘Know for certain that on the day you leave [Jerusalem] and go anywhere, you shall surely die’? And you said to me, ‘The word (ruling) I have heard is good.’ Why then have you not kept the oath of the LORD, and the command which I gave you?” The king also said to Shimei, “You are aware in your own heart of all the evil you did to my father David; so the LORD shall return your evil on your own head. But King Solomon shall be blessed, and the throne of David shall be established before the LORD forever.” So the king commanded Benaiah the son of Jehoiada, and he went out and struck down Shimei, and he died.
S o the kingdom was established in the hands of Solomon.