1 Kings 2:36-46 English Standard Version (ESV)
36 Then the king sent and summoned Shimei and said to him, “Build yourself a house in Jerusalem and dwell there, and do not go out from there to any place whatever. 37 For on the day you go out and cross the brook Kidron, know for certain that you shall die. Your blood shall be on your own head.” 38 And Shimei said to the king, “What you say is good; as my lord the king has said, so will your servant do.” So Shimei lived in Jerusalem many days.
39 But it happened at the end of three years that two of Shimei’s servants ran away to Achish, son of Maacah, king of Gath. And when it was told Shimei, “Behold, your servants are in Gath,” 40 Shimei arose and saddled a donkey and went to Gath to Achish to seek his servants. Shimei went and brought his servants from Gath. 41 And when Solomon was told that Shimei had gone from Jerusalem to Gath and returned,42 the king sent and summoned 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 go out and go to any place whatever, you shall die’? And you said to me, ‘What you say is good; I will obey.’ 43 Why then have you not kept your oath to the Lord and the commandment with which I commanded you?” 44 The king also said to Shimei, “You know in your own heart all the harm that you did to David my father. So the Lord will bring back your harm on your own head. 45 But King Solomon shall be blessed, and the throne of David shall be established before the Lordforever.” 46 Then the king commanded Benaiah the son of Jehoiada, and he went out and struck him down, and he died.
So the kingdom was established in the hand of Solomon.