1 Samuel 4:2

And the Philistines put themselves in array against Israel: and when they joined battle, Israel was smitten before the Philistines: and they slew of the army in the field about four thousand men.

This verse records Israel's first defeat in the war with the Philistines, in the first engagement, when Israel was smitten before the Philistines and about four thousand men of the army were slain in the field. That defeat occurred on the same field where, twenty years later, Israel won a victory. Israel had gone out rashly to battle against the gathered Philistine forces without seeking counsel from the Lord and without the concurrence of the high priest or a prophet, Eli or Samuel.

The hand of God was not with Israel, and the loss was a token and sign of the Lord's displeasure and judgment, for the nation's sins and its unbelief and rebellion had made it ripe for judgment. The people were so blinded by unbelief and rebellion that they failed to recognize their sins had brought the disaster and could not see God's judgment in it. The defeat made the Israelites fear that other nations hearing of it would be encouraged to attack them and make war with them.

When Israel returned disheartened to their tents, the elders asked why the Lord had smitten them that day before the Philistines. The elders wrongly blamed the defeat on the absence of the ark of God and sought to bring the ark into the camp as a means of securing victory. They remembered that the ark had accompanied them across the Jordan and at the easy conquest of Jericho, and concluded that only bringing the ark to the battle would give triumph over their enemies.

Israel's true strength was in obedience to God's law contained in the ark, which was a representative of God himself, not in the mere presence of the ark. The ark's presence could not secure victory while Hophni and Phinehas, who were violating and transgressing that law, along with the people, carried it. In that earlier defeat the priests were killed and the ark of God was taken. The contrast between that defeat and the later victory on the same field teaches that disobedience leads to disaster and defeat, while obedience to God is the path of safety and happiness.