1 Samuel 4:3

4:3 When the army came back to the camp, the elders of Israel said, “Why did the Lord let us be defeated today by the Philistines? Let’s take with us the ark of the covenant of the Lord from Shiloh. When it is with us, it will save us from the hand of our enemies.

1 Samuel 7:10

7:10 As Samuel was offering burnt offerings, the Philistines approached to do battle with Israel. But on that day the Lord thundered loudly against the Philistines. He caused them to panic, and they were defeated by Israel.