5
2 Samuel

David's Victories over the Philistines

2 Samuel 5:17-25
17The Philistines heard that they had anointed David king over Israel, so all the Philistines went up to seek David. When David heard of it, he went down to the fortress. 18The Philistines came and deployed themselves in the valley of Rephaim. 19David inquired of the LORD, saying, "Shall I go up against the Philistines? Will you deliver them into my hand?" The LORD answered David, "Go up, for I will certainly give the Philistines into your hand." 20David came to Baal-perazim, and David struck them there. He said, "The LORD has broken through my enemies before me like a breach of waters." Therefore that place was called Baal-perazim. 21They abandoned their idols there, and David and his men carried them away. 22The Philistines again went up and deployed themselves in the valley of Rephaim. 23David inquired of the LORD, and he said, "Do not go up; circle around behind them and approach them opposite the balsam trees. 24When you hear the sound of marching in the tops of the balsam trees, then act decisively, for at that moment the LORD will have gone out before you to strike the camp of the Philistines." 25David acted exactly as the LORD had commanded him and struck the Philistines from Geba as far as Gezer.

Key words in this passage

Cross-references

Study notes

David meets the Philistine threat by inquiring of the LORD before each clash in the valley of Rephaim. The first answer authorizes a direct strike that produces a breakthrough named Baal-perazim. The second withholds permission for the same approach and instead requires a flanking movement past the balsam trees, timed to an audible signal that marks the LORD already moving ahead. David follows both sets of instructions without deviation, and the second produces a longer pursuit from Geba to Gezer. The account therefore keeps attention on the need for fresh direction in each moment rather than on reusable tactics or the details of the fighting itself.

What is David's Victories over the Philistines about?

Soon after the tribes anoint David king over Israel, the Philistines move against him. They had heard the news of the anointing and came up to find him, forcing David to withdraw to the fortress while they spread out in the valley of Rephaim. The immediate question is whether David will meet this threat on his own or seek direction from the LORD. In 5:19 David asks explicitly whether he should attack and whether the LORD will hand the Philistines over, receiving the clear answer to go up because victory is assured. The first clash at Baal-perazim ends with the enemy abandoning their idols, which David’s men carry off. When the Philistines return and deploy again in the same valley, David inquires once more and receives different orders: to circle behind and wait for the sound of marching in the balsam trees before striking. These two encounters stand at the start of David’s reign over the united kingdom and show how each military decision is shaped by a fresh word from the LORD rather than by prior success or fixed tactics.

Where does this passage sit in 2 Samuel?

These verses sit directly after David’s capture of Jerusalem and the account of his growing household in 5:6-16. The move to the fortress in 5:17 therefore reads as a defensive response to the same consolidation of power that made Jerusalem his new capital. The Philistines’ second deployment in the valley of Rephaim in 5:22 repeats the location named in 5:18, yet the LORD’s reply in 5:23 withholds permission to attack and instead orders a flanking maneuver. That shift in directive marks the only place in the immediate narrative where David receives two distinct answers to the same basic question.

The pattern of inquiry itself reaches back to 2:1, where David first asked the LORD about moving to Judah. Here the same verb recurs twice in quick succession, framing the two battles as paired demonstrations rather than isolated victories. After the first success David names the site Baal-perazim and removes the abandoned idols; after the second he simply obeys and drives the enemy from Geba to Gezer. The absence of any further naming or trophy-taking keeps the focus on precise compliance with the second set of instructions.

Positioned before the ark procession in chapter 6, the double victory clears the immediate military threat and leaves David free to address the cultic center. The narrative therefore places these encounters between the political establishment of the capital and the religious relocation of the ark, showing one form of consolidation giving way to another without any intervening summary of David’s reign.

How is the passage structured?

After the report reaches David and he withdraws, the Philistines occupy the valley of Rephaim without further speech. David’s single question in verse 19 receives an immediate affirmative answer that names both the action and its outcome. The narrative then records the strike at Baal-perazim, followed by David’s own explanatory sentence that supplies the place name. The abandoned idols are carried off in a single clause that closes the first engagement.

The Philistines reappear in the same valley, creating an exact repetition of their deployment. David inquires again, yet the LORD’s reply now withholds permission to attack directly and instead supplies a sequence of movements: a circuit behind the enemy, a position opposite the balsam trees, and a precise auditory signal before any strike. The command ends with the assurance that the LORD himself will already be moving ahead at the moment the sound is heard.

David’s final action is reported in one sentence that confirms exact compliance and extends the pursuit from Geba to Gezer. The two inquiries therefore stand in parallel, but the second replaces a simple go-ahead with a timed, indirect maneuver whose success hinges on waiting for an external cue rather than immediate assault.

What is the historical background?

David twice inquires of the LORD before engaging the Philistines. This step follows an established pattern in which Israelite leaders sought a direct answer from God, usually through a priest who carried the ephod and could present yes-or-no questions. The answers recorded in 5:19 and 5:23 therefore shaped the timing and route of each attack rather than leaving the decision to military custom alone.

The valley of Rephaim offered a broad, level stretch of ground southwest of Jerusalem. Its position made it a natural assembly point for forces approaching the city from the west or south, which explains why the Philistines chose it both times. The same valley contained stands of balsam trees whose rustling could be heard at a distance, supplying a concrete marker for the moment David was told to advance.

When the Philistines abandoned their idols after the first clash, they left behind objects that ancient armies routinely carried into battle. These images represented the presence and power of their gods on the field. Removing them, as David and his men did, removed that visible claim from the site and left the place associated instead with the LORD’s breakthrough.

The pursuit that followed reached from Geba in the territory of Benjamin to Gezer farther west. These two points defined the practical limits of the victory and secured the main routes that connected the hill country with the coastal plain, preventing an immediate return of Philistine pressure on the newly unified kingdom.

What does this passage teach about God?

David’s two inquiries of the LORD frame the entire episode. In the first he asks whether he should attack and whether the LORD will deliver the Philistines, and the answer comes without qualification: go up, for victory is certain. The second inquiry receives a different reply that withholds permission to advance directly and instead orders a flanking movement timed to an audible signal in the balsam trees. The LORD’s varied instructions show that guidance is not a fixed formula but a fresh word for each moment of need.

The narrative attributes the actual defeat to the LORD’s own movement. At Baal-perazim David names the place after the LORD’s breaking through, yet the second battle is described even more explicitly: when the sound is heard, the LORD will already have gone out before the army to strike the camp. Human action follows rather than initiates the decisive blow. The Philistines’ abandoned idols, carried away by David’s men, further illustrate that the gods they brought to the field offered no protection once the LORD acted.

David’s final obedience is recorded without elaboration: he acted exactly as the LORD had commanded and struck the Philistines from Geba as far as Gezer. The outcome therefore rests on correspondence between divine command and human execution rather than on superior numbers or terrain. The passage presents God as both the source of direction and the agent of victory, while presenting the king as one who must repeatedly seek and then follow what he is told.

What are the interpretive difficulties?

The two inquiries David makes of the LORD raise a straightforward question about divine guidance. In the first exchange the answer is direct: go up, because the LORD will give the Philistines into his hand. The second time the reply withholds permission to attack straight on and instead supplies a flanking route past the balsam trees, timed to a sound of marching. Nothing in the verses explains why the instructions differ. The text simply records that David receives one set of orders for the initial clash at Baal-perazim and another when the Philistines reappear in the same valley.

A second question concerns the idols left behind after the first defeat. The Philistines abandon them, and David’s men carry them away. The account offers no further comment on whether this action treats the objects as spoils, removes objects of worship, or serves some other purpose. Later biblical writers sometimes condemn the retention of foreign images, yet the present narrative records the event without evaluation.

The description of the second battle also leaves the precise nature of the signal in the balsam trees unstated. David is told to listen for marching in the treetops and then to act, because at that moment the LORD will already have gone out ahead. The passage does not clarify whether the sound is natural wind, supernatural movement, or something else. It only asserts that the moment itself marks the LORD’s prior action against the Philistine camp.

Finally, the report that David struck the Philistines from Geba as far as Gezer gives the extent of the pursuit but supplies no details about casualties, the size of either force, or the political consequences. The verses focus on the fact that David followed the LORD’s command exactly and that the enemy was driven back across a defined stretch of territory. These silences keep attention on the pattern of inquiry and obedience rather than on military logistics.

Movement by movement

Philistines Advance on the New King5:17-18

The report that David has been anointed king over Israel reaches the Philistines at once. All of them therefore move up together to look for him. David receives the same report and retreats to the fortress, leaving the Philistines free to occupy the valley of Rephaim without resistance. The valley lies southwest of Jerusalem and offers open ground for a large force to spread out. By recording only the movement and the deployment, the narrative shows the threat forming while David remains inside the stronghold. This withdrawal follows directly from his recent capture of Jerusalem; the same consolidation of power that established his new capital now draws an immediate response from the neighboring power. The text gives no speech from either side, only the fact that the Philistines act on the news of the anointing and that David chooses the fortress rather than meeting them in the open field. That choice leaves the next step to whatever direction he may seek once the enemy has taken position.

First Inquiry and Breakthrough at Baal-perazim5:19-20

David inquires of the LORD with two direct questions: whether he should go up against the Philistines and whether the LORD will deliver them into his hand. The answer comes without qualification, directing him to go up because the Philistines will certainly be given into his hand. David then moves to Baal-perazim and strikes the enemy there. His own words afterward describe what happened as the LORD breaking through his enemies before him like a breach of waters, and the place receives its name from that description. The narrative records the victory as the direct result of the LORD’s promise rather than as an outcome of David’s initiative alone. The single clause that follows notes the abandoned idols left behind, but the focus remains on the place name that ties the site to the LORD’s action. This first engagement therefore stands as the moment when David receives an immediate affirmative reply and acts on it, with the explanatory sentence he supplies becoming the lasting label for the location.

Abandoned Idols Carried Away5:21

The Philistines left their idols on the field at Baal-perazim once the fighting turned against them. The single sentence records that they abandoned the images there and that David and his men carried them away. This action follows directly from the strike David delivered after the LORD’s clear permission to go up. The idols receive no description or further mention, yet their presence on the battlefield marks the point where the defeated force withdrew without retrieving what they had brought. David’s men simply removed the objects as part of clearing the site. The detail stands apart from the place-naming that precedes it and from the second Philistine deployment that follows, functioning as the only record of material taken after the first clash. Nothing in the verse indicates whether the idols were later destroyed, kept, or returned.

Second Advance and New Instructions5:22-24

The Philistines again went up and deployed themselves in the valley of Rephaim. The same ground that hosted their first defeat now receives them once more, yet David does not assume the earlier permission still holds. He inquires of the LORD a second time. The reply withholds any direct advance: "Do not go up; circle around behind them and approach them opposite the balsam trees. The command shifts the point of contact and adds a precise timing signal. David must wait until he hears the sound of marching in the tops of the balsam trees, then move at once, because that sound marks the moment the LORD will have gone out before him to strike the Philistine camp. Nothing in the account explains why the LORD gives flanking orders rather than repeating the earlier assurance of victory. The text simply records two distinct answers to two inquiries made at the same location, leaving the difference between them as part of the guidance itself. David receives direction that is neither automatic nor reusable but spoken for this renewed threat.

Obedience and Extended Pursuit5:25

David acted exactly as the LORD had commanded him and struck the Philistines from Geba as far as Gezer. The command in the previous exchange had required a flanking approach past the balsam trees rather than a direct advance, with the signal for attack tied to the sound of marching overhead. Compliance with that precise route and timing produces not a single clash but a sustained drive that carries the fighting westward from Geba to Gezer. The narrative records no deviation or addition on David’s part; the outcome is simply the extension of the LORD’s promised strike against the Philistine camp. This longer pursuit stands in contrast to the first engagement at Baal-perazim, where the victory remained localized and the enemy left idols behind. Here the Philistines are pushed out of the immediate valley and back along the route toward their own territory. The verse therefore presents obedience as the direct link between the LORD’s varied instructions and the broader territorial result.

Notes accompany the Anselm Project Bible, an AI translation from the original languages. Tap any verse above for the committee's word-level decisions.

Tap a verse