The king and his troops marched on Jerusalem against the Jebusites, who inhabited the territory. The Jebusites said to David, "You'll never get us in here! Even the blind and the lame will beat you back!""David will never enter here," they said to each other.
But David did capture the fortress of Zion—which became David's City.
"On that day," David said, "whoever attacks the Jebusites should strike the windpipe because David hates the lame and the blind." That is why people say, "The blind and the lame will not enter the temple."
David occupied the fortress, so it was renamed David's City. David built a city around it from the earthen terraces inward.
David grew increasingly powerful, and the LORD of heavenly forces was with him.
Tyre's King Hiram sent messengers to David with cedar logs, bricklayers, and carpenters to build David a palace.
Then David knew that the LORD had established him as king over Israel, and that his kingship was held in great honor for the sake of his people Israel.
After he left Hebron, David married more secondary wives in Jerusalem and fathered more sons and daughters.
The names of his children in Jerusalem were as follows: Shammua, Shobab, Nathan, Solomon,
Ibhar, Elishua, Nepheg, Japhia,
Elishama, Eliada, and Eliphelet.
When the Philistines heard that David had been anointed king over Israel, they all marched up to find him, but David heard of it and went down to the fortress.
The Philistines arrived and spread out over the Rephaim Valley.
David asked the LORD, "Should I attack the Philistines? Will you hand them over to me?" "Attack them," the LORD replied, "because I will definitely hand the Philistines over to you."
So David arrived at Baal-perazim and defeated the Philistines there. He said, "The LORD has burst out against my enemies, the way water bursts out!" That is why that place is called Baal-perazim.
The Philistines left their divine images behind, and David and his men carried them off.
Once again the Philistines came up and spread out across the Rephaim Valley.
When David asked the LORD, God replied, "Don't attack them directly. Circle around behind them and come at them from in front of the balsam trees.
As soon as you hear the sound of marching in the tops of the trees, then attack, for God has attacked in front of you to defeat the Philistine army."
David followed God's orders exactly, and they defeated the Philistine army from Gibeon all the way to Gezer.