Here is the account of how he rebelled against the king: Solomon had built the terraces and had filled in the gap in the wall of the city of David his father.
Solomon made an alliance with Pharaoh king of Egypt and married his daughter. He brought her to the City of David until he finished building his palace and the temple of the Lord, and the wall around Jerusalem.
And the palace in which he was to live, set farther back, was similar in design. Solomon also made a palace like this hall for Pharaoh’s daughter, whom he had married.
Then he worked hard repairing all the broken sections of the wall and building towers on it. He built another wall outside that one and reinforced the terraces of the City of David. He also made large numbers of weapons and shields.
Solomon brought Pharaoh’s daughter up from the City of David to the palace he had built for her, for he said, “My wife must not live in the palace of David king of Israel, because the places the ark of the Lord has entered are holy.”