Hiram, king of Tyre, sends messengers to David with cedar timber, stonemasons and carpenters to build him a house. David then understands that the Lord has confirmed him as king over Israel and that his kingdom has been exalted for the sake of his people. In Jerusalem, David takes more wives and has more sons and daughters, among them Solomon.
When the Philistines hear that David has been anointed king over all Israel, they go up to seek him. David inquires of God whether he should go up against them and whether God will give them into his hand, and the Lord says yes. David defeats them at Baal-perazim and says that God has broken through his enemies by his hand like a breaking flood. The Philistines leave their gods there, and David orders them burned.
The Philistines again raid in the valley of Rephaim. Once more David inquires of God, who this time tells him not to go up directly but to circle around and attack them opposite the balsam trees. When he hears the sound of marching in the tops of the balsam trees, then he is to go out to battle, for God has gone out before him. David does so and strikes down the Philistine army from Gibeon to Gezer. The chapter ends by saying that David's fame went out into every land and that the Lord brought the fear of him upon all the nations.