1 Kings 2:46

So the king commanded Benaiah the son of Jehoiada; which went out, and fell upon him, that he died. And the kingdom was established in the hand of Solomon.

The verse belongs to the account of Solomon's accession and reign after David's death, describing the measures taken to secure his throne. It is part of the history of the undivided kingdom under Solomon, contained in the first eleven chapters of 1 Kings that contain the life of Solomon and paralleled in the opening portion of 2 Chronicles. It stands before the death of Solomon, the succession of Rehoboam, the division into the kingdoms of Israel and Judah, and their final overthrow, showing the kingdom of Israel becoming established in the hand of Solomon as successor of David, who had succeeded Saul. It shows Solomon carrying out the measures David had charged him to take to secure the throne, with Benaiah killing the man condemned and the kingdom thereby established.

Nathan the prophet knew the Lord's will and David's intent and blocked Adonijah's plan so that Solomon was made king, for Adonijah's bid for the throne was unholy ambition seeking to use David's old age. Adonijah's attempt to seize the throne ended in his overthrow and death for a further offence and insult to the king after he had first fled to the horns of the altar and been pardoned for the time being. Joab, who was disloyal to his king, was also put to death, and Abiathar the priest was retired from his office, so that with fear upon the adherents of Adonijah and their dispersal the throne came peaceably to Solomon amid general rejoicing. Solomon's rule was thus made firm by his crowning and by the removal of opponents.

Shimei, who had cursed David, was executed by Benaiah on Solomon's command because he did not keep the conditions set for sparing his life, breaking the oath and command to remain in Jerusalem. His death followed from his own violation and marked his downfall, in contrast to his earlier assumption that David was falling during Absalom's revolt. On the king's command Benaiah the son of Jehoiada, captain of the king's hosts, went out and fell upon the condemned opponent, who died. By this crowning and removal of opposition the kingdom of Israel as successor to David, who had succeeded Saul, was made firm and established in the hand of Solomon.

Solomon took the throne when about twenty years of age. He reigned conjointly with David about six months. David reigned forty years.