1 Samuel 7:1-15
And the men of Kiriath-jearim came and took the ark of the Lord and brought it into the house of Abinadab on the hill, and consecrated Eleazar his son to keep the ark of the Lord. From the day that the ark remained at Kiriath-jearim, the time was long, for it was twenty years; and all the house of Israel lamented after the Lord.
Then Samuel spoke to all the house of Israel, saying, “If you return to the Lord with all your heart, remove the foreign gods and the Ashtaroth from among you and direct your hearts to the Lord and serve Him alone; and He will deliver you from the hand of the Philistines.” So the sons of Israel removed the Baals and the Ashtaroth and served the Lord alone.
Then Samuel said, “Gather all Israel to Mizpah and I will pray to the Lord for you.” They gathered to Mizpah, and drew water and poured it out before the Lord, and fasted on that day and said there, “We have sinned against the Lord.” And Samuel judged the sons of Israel at Mizpah.
Now when the Philistines heard that the sons of Israel had gathered to Mizpah, the lords of the Philistines went up against Israel. And when the sons of Israel heard it, they were afraid of the Philistines. Then the sons of Israel said to Samuel, “Do not cease to cry to the Lord our God for us, that He may save us from the hand of the Philistines.” Samuel took a suckling lamb and offered it for a whole burnt offering to the Lord; and Samuel cried to the Lord for Israel and the Lord answered him. Now Samuel was offering up the burnt offering, and the Philistines drew near to battle against Israel. But the Lord thundered with a great thunder on that day against the Philistines and confused them, so that they were routed before Israel. The men of Israel went out of Mizpah and pursued the Philistines, and struck them down as far as below Beth-car.
Then Samuel took a stone and set it between Mizpah and Shen, and named it Ebenezer, saying, “Thus far the Lord has helped us.” So the Philistines were subdued and they did not come anymore within the border of Israel. And the hand of the Lord was against the Philistines all the days of Samuel. The cities which the Philistines had taken from Israel were restored to Israel, from Ekron even to Gath; and Israel delivered their territory from the hand of the Philistines. So there was peace between Israel and the Amorites.