11 King Hiram of Tyre sent messengers to David, along with cedar trees, and carpenters and masons who built David a house. 12 David then perceived that the Lord had established him king over Israel, and that he had exalted his kingdom for the sake of his people Israel.
13 In Jerusalem, after he came from Hebron, David took more concubines and wives; and more sons and daughters were born to David. 14 These are the names of those who were born to him in Jerusalem: Shammua, Shobab, Nathan, Solomon, 15 Ibhar, Elishua, Nepheg, Japhia, 16 Elishama, Eliada, and Eliphelet.
17 When the Philistines heard that David had been anointed king over Israel, all the Philistines went up in search of David; but David heard about it and went down to the stronghold. 18 Now the Philistines had come and spread out in the valley of Rephaim. 19 David inquired of the Lord, "Shall I go up against the Philistines? Will you give them into my hand?" The Lord said to David, "Go up; for I will certainly give the Philistines into your hand." 20 So David came to Baal-perazim, and David defeated them there. He said, "The Lord has burst forth against my enemies before me, like a bursting flood." Therefore that place is called Baal-perazim. 21 The Philistines abandoned their idols there, and David and his men carried them away. 22 Once again the Philistines came up, and were spread out in the valley of Rephaim. 23 When David inquired of the Lord, he said, "You shall not go up; go around to their rear, and come upon them opposite the balsam trees. 24 When you hear the sound of marching in the tops of the balsam trees, then be on the alert; for then the Lord has gone out before you to strike down the army of the Philistines." 25 David did just as the Lord had commanded him; and he struck down the Philistines from Geba all the way to Gezer.
Matthew Henry's Commentary on 2 Samuel 5:11-25
Commentary on 2 Samuel 5:11-16
(Read 2 Samuel 5:11-16)
David's house was not the worse, nor the less fit to be dedicated to God, for being built by the sons of the stranger. It is prophesied of the gospel church, The sons of strangers shall build up thy walls, and their kings shall minister unto thee, Isaiah 60:10. David's government was rooted and built up. David was established king; so is the Son of David, and all who, through him, are made to our God kings and priests. Never had the nation of Israel appeared so great as it began now to be. Many have the favour and love of God, yet do not perceive it, and so want the comfort of it; but to be exalted to that, and to perceive it, is happiness. David owned it was for his people's sake God had done great things for him; that he might be a blessing to them, and that they might be happy under him.
Commentary on 2 Samuel 5:17-25
(Read 2 Samuel 5:17-25)
The Philistines considered not that David had the presence of God with him, which Saul had forfeited and lost. The kingdom of the Messiah, as soon as it was set up in the world, was thus attacked by the powers of darkness. The heathen raged, and the kings of the earth set themselves to oppose it; but all in vain, Acts 2:2.