The men of Kiriath Jearim came and took the Ark of the Lord to Abinadab's house on a hill. There they made Abinadab's son Eleazar holy for the Lord so he could guard the Ark of the Lord.
The Ark stayed at Kiriath Jearim a long time -- twenty years in all. And the people of Israel began to follow the Lord again.
Samuel spoke to the whole group of Israel, saying, "If you're turning back to the Lord with all your hearts, you must remove your foreign gods and your idols of Ashtoreth. You must give yourselves fully to the Lord and serve only him. Then he will save you from the Philistines."
So the Israelites put away their idols of Baal and Ashtoreth, and they served only the Lord.
Samuel said, "All Israel must meet at Mizpah, and I will pray to the Lord for you."
So the Israelites met together at Mizpah. They drew water from the ground and poured it out before the Lord and did not eat that day. They confessed, "We have sinned against the Lord." And Samuel served as judge of Israel at Mizpah.
The Philistines heard the Israelites were meeting at Mizpah, so the Philistine kings came up to attack them. When the Israelites heard they were coming, they were afraid.
They said to Samuel, "Don't stop praying to the Lord our God for us! Ask him to save us from the Philistines!"
Then Samuel took a baby lamb and offered it to the Lord as a whole burnt offering. He called to the Lord for Israel's sake, and the Lord answered him.
While Samuel was burning the offering, the Philistines came near to attack Israel. But the Lord thundered against them with loud thunder. They were so frightened they became confused. So the Israelites defeated the Philistines in battle.
The men of Israel ran out of Mizpah and chased the Philistines almost to Beth Car, killing the Philistines along the way.
After this happened Samuel took a stone and set it up between Mizpah and Shen. He named the stone Ebenezer, saying, "The Lord has helped us to this point."
So the Philistines were defeated and did not enter the Israelites' land again. The Lord was against the Philistines all Samuel's life.
Earlier the Philistines had taken towns from the Israelites, but the Israelites won them back, from Ekron to Gath. They also took back from the Philistines the lands near these towns. There was peace also between Israel and the Amorites.
Samuel continued as judge of Israel all his life.
Every year he went from Bethel to Gilgal to Mizpah and judged the Israelites in all these towns.
But Samuel always went back to Ramah, where his home was. There he judged Israel and built an altar to the Lord.