1 Kings 2:45--3:1

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.

The Lord Gives Solomon Wisdom

3:1 Solomon made an alliance by marriage with Pharaoh, king of Egypt; he married Pharaoh’s daughter. He brought her to the City of David until he could finish building his residence and the temple of the Lord and the wall around Jerusalem.