According to archaeologists Yossi Garfinkel and Saar Ganor, a hill shown on maps as Khirbet Qeiyafa is a Biblical city called Shaarayim, mentioned in ISam 17:52.
"Then the men of Israel and Judah gave a great shout of triumph and rushed after the Philistines, chasing them as far as Gath and the gates of Ekron." The bodies of the dead and wounded Philistines were strewn all along the road from Shaaraim, as far as Gath and Ekron."
Yesterday I sat on the top of this hill and could see the junction of the roads leading southwards to Gat and westward to Ekron. I could imagine the scene described in the above verse.
The above verse tells how the great battle ended. It begins in verse 1 of this chapter, with the geographic locations of the armies and how David slew Goliath.
"The Philistines now mustered their army for battle and camped between Socoh in Judah and Azekah at Ephes-dammim."
After finding that the city has two gates, the archaeologists realized that this is Shaarayim, which means "two gates"
I sat just near the massive ruins, which archaeologists, think is the palace where David, as king of Israel, might have stayed when he returned here in later years as king of Israel.
I looked at the valley below as David must have done, remembering the day when, as a young boy he came running through the valley from Bethlehem in the Judean Hills, only a few hours away, to fight Goliath and save his nation. His first act of salvation. Later as king of Israel he'd be involved in many other battles, but I'm sure this town had a special place in his heart. In fact I have a feeling that David built this town.
I walked exactly where David had walked, (probably ran) enthusiastically on his way to the battle. It's easy to see why David ordered a fortress city to be built here; it looked then as it looked today; newly harvested wheat fields, next to lush green vines starting to produce the grapes, that will be harvested at the end of August. Shaarayim guards the entrance to the Elah Valley and the Judean Hills, the homeland of the Jewish People.
The Philistines controlled the plains, the Israelites, the hill country. The Philistines were stronger in the plains, because they had chariots. The hill country and the plains meet at Shaarayim. The Israelites were stronger in the hills, because they fought with bows and arrows. The Philistines dearly wanted to conquer the hills, which would give them control over all Israel. Israel's victory lay in holding on to their hill country homeland. Their objective was to live in peace, studying their Torah and developing a wonderful society where peace would reign, in complete contrast to all the nations around them, who worshiped the gods of war.
Here is an interesting article with Prof Garfinkel's own descriptions and pictures of the discoveries made at Shaaraim