Although the Lord would not allow David himself to construct the First Temple in Jerusalem, he set aside much gold and finery from his spoils of war to be used in it. He bought the
sight of the future Temple, where he built only an altar. According to 1 Chr 28, David himself wrote out the plans for the Temple, which he gave to Solomon, and also arranged the priests who would serve there into divisions, as well as designating numerous weights and measures important in the Temple’s function.
Solomon, David's son, completed and dedicated the Temple after his father's death. It stood until approximately 586 B.C., when Nebuchadnezzar and the Babylonians captured Jerusalem.