1 Kings 2:42-46

2:42 the king summoned Shimei and said to him, “You will recall that I made you take an oath by the Lord, and I solemnly warned you, ‘If you ever leave and go anywhere, know for sure that you will certainly die.’ You said to me, ‘The proposal is acceptable; I agree to it.’ 2:43 Why then have you broken the oath you made before the Lord and disobeyed the order I gave you?” 2:44 Then the king said to Shimei, “You are well aware of the way you mistreated my father David. The Lord will punish you for what you did. 2:45 But King Solomon will be empowered and David’s dynasty will endure permanently before the Lord.” 2:46 The king then gave the order to Benaiah son of Jehoiada who went and executed Shimei.

So Solomon took firm control of the kingdom.