Joab fled to the tent of the LORD and took hold of the horns of the altar (1 Kings 2:28). Solomon ordered Benaiah to strike him there after Joab refused to come out (1 Kings 2:29-34). Solomon tied the judgment to Joab’s bloodshed in killing Abner and Amasa (1 Kings 2:31-32).
In 1 Kings 2:26–35 Solomon secures his rule by dealing with two key figures from David’s era. He banishes Abiathar from the priesthood instead of executing him, citing Abiathar’s past service and suffering alongside David. Then Solomon orders Joab’s execution after Joab clings to the altar for refuge. This unit sits in the opening reign narrative where Solomon acts on David’s final instructions and resolves threats from rivals and compromised leaders.
This passage presents Solomon securing his early reign by removing two powerful figures tied to the previous administration: Abiathar the priest and Joab the commander.
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with 1 Kings 2:28, then read the surrounding section so the answer stays connected to the passage's flow.
28The news came to Joab; for Joab had turned after Adonijah, though he didn`t turn after Absalom. Joab fled to the Tent of Yahweh, and caught hold on the horns of the altar.