1 Chronicles 14:1-17
David Established at Jerusalem
King Hiram of Tyre sent messengers to David, along with cedar logs, and masons and carpenters to build a house for him. David then perceived that the LORD had established him as king over Israel, and that his kingdom was highly exalted for the sake of his people Israel.
David took more wives in Jerusalem, and David became the father of more sons and daughters. These are the names of the children whom he had in Jerusalem: Shammua, Shobab, and Nathan; Solomon, Ibhar, Elishua, and Elpelet; Nogah, Nepheg, and Japhia; Elishama, Beeliada, and Eliphelet.
Defeat of the Philistines
When the Philistines heard that David had been anointed king over all Israel, all the Philistines went up in search of David; and David heard of it and went out against them. Now the Philistines had come and made a raid in the valley of Rephaim. David inquired of God, “Shall I go up against the Philistines? Will you give them into my hand?” The LORD said to him, “Go up, and I will give them into your hand.” So he went up to Baal-perazim, and David defeated them there. David said, “God has burst out against my enemies by my hand, like a bursting flood.” Therefore that place is called Baal-perazim. They abandoned their gods there, and at David's command they were burned.
Once again the Philistines made a raid in the valley. When David again inquired of God, God said to him, “You shall not go up after them; go around and come on them opposite the balsam trees. When you hear the sound of marching in the tops of the balsam trees, then go out to battle; for God has gone out before you to strike down the army of the Philistines.” David did as God had commanded him, and they struck down the Philistine army from Gibeon to Gezer. The fame of David went out into all lands, and the LORD brought the fear of him on all nations.