1 Kings 2:8-9 New Revised Standard Version (NRSV)
8 There is also with you Shimei son of Gera, the Benjaminite from Bahurim, who cursed me with a terrible curse on the day when I went to Mahanaim; but when he came down to meet me at the Jordan, I swore to him by the Lord, ‘I will not put you to death with the sword.’ 9 Therefore do not hold him guiltless, for you are a wise man; you will know what you ought to do to him, and you must bring his gray head down with blood to Sheol.”
1 Kings 2:36-46 New Revised Standard Version (NRSV)
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.” 38 And Shimei said to the king, “The sentence is fair; 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 slaves ran away to King Achish son of Maacah of Gath. When it was told Shimei, “Your slaves are in Gath,” 40 Shimei arose and saddled a donkey, and went to Achish in Gath, to search for his slaves; Shimei went and brought his slaves from Gath. 41 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 adjure 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, ‘The sentence is fair; I accept.’ 43 Why then have you not kept your oath to the Lord and the commandment with which I charged you?” 44 The king also said to Shimei, “You know in your own heart all the evil that you did to my father David; so the Lord will bring back your evil on your own head. 45 But King Solomon shall be blessed, and the throne of David shall be established before the Lord forever.” 46 Then the king commanded Benaiah son of Jehoiada; and he went out and struck him down, and he died.
So the kingdom was established in the hand of Solomon.