1 Kings 2:27-37

27 So Solomon banished Abiathar from being priest to the Lord, thus fulfilling the word of the Lord that he had spoken concerning the house of Eli in Shiloh.
28 When the news came to Joab—for Joab had supported Adonijah though he had not supported Absalom—Joab fled to the tent of the Lord and grasped the horns of the altar.
29 When it was told King Solomon, "Joab has fled to the tent of the Lord and now is beside the altar," Solomon sent Benaiah son of Jehoiada, saying, "Go, strike him down."
30 So Benaiah came to the tent of the Lord and said to him, "The king commands, "Come out.' " But he said, "No, I will die here." Then Benaiah brought the king word again, saying, "Thus said Joab, and thus he answered me."
31 The king replied to him, "Do as he has said, strike him down and bury him; and thus take away from me and from my father's house the guilt for the blood that Joab shed without cause.
32 The Lord will bring back his bloody deeds on his own head, because, without the knowledge of my father David, he attacked and killed with the sword two men more righteous and better than himself, Abner son of Ner, commander of the army of Israel, and Amasa son of Jether, commander of the army of Judah.
33 So shall their blood come back on the head of Joab and on the head of his descendants forever; but to David, and to his descendants, and to his house, and to his throne, there shall be peace from the Lord forevermore."
34 Then Benaiah son of Jehoiada went up and struck him down and killed him; and he was buried at his own house near the wilderness.
35 The king put Benaiah son of Jehoiada over the army in his place, and the king put the priest Zadok in the place of Abiathar.
36 Then the king sent and summoned Shimei, and said to him, "Build yourself a house in Jerusalem, and live there, and do not go out from there to any place whatever.
37 For on the day you go out, and cross the Wadi Kidron, know for certain that you shall die; your blood shall be on your own head."
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.