Solomon made an agreement with the king of Egypt by marrying his daughter and bringing her to Jerusalem. At this time Solomon was still building his palace and the Temple of the Lord, as well as a wall around Jerusalem.
The Temple was finished during the eleventh year he was king, in the eighth month, the month of Bul. It was built exactly as it was planned. Solomon had spent seven years building it.