1 Kings 2:28-35 - Joab's Execution
28 When Joab learned what had happened, he ran to the LORD's tent and grabbed hold of the horns of the altar, since Joab had supported Adonijah (though he had not supported Absalom).
29 Somebody informed King Solomon, "Joab just ran to the LORD's tent and now he's standing beside the altar!" But Solomon ordered Jehoiada's son Benaiah, "Go kill him!"
30 So Benaiah went into the LORD's tent and told Joab, "The king orders you to come out!" "No," Joab said, "I'd rather die here!" So Benaiah went and informed the king, "This is how Joab answered me."
31 The king replied to him, "Do just what he asked. Kill him and bury him so that you may remove from me and from my father's household the guilt that Joab shed needlessly. 32 The LORD will repay him for his bloodshed because, without my father David's consent he attacked and murdered two men more righteous and better than he, Ner's son Abner, the commander of Israel's army and Jether's son Amasa, commander of Judah's army. 33 May their blood be repaid to Joab and to his descendants forever, and may there be peace shown from the LORD forever to David, to his descendants, to his household, and to his throne."
34 Jehoiada's son Benaiah then approached Joab, attacked him, killed him, and had him buried at Joab's home in the wilderness. 35 The king appointed Jehoiada's son Benaiah in charge of the army to replace Joab and also appointed Zadok the priest to replace Abiathar.