1 Samuel 3.11-4.11
Then the Lord said to Samuel, "Behold, I am about to do a thing in Israel, at which the ears of everyone who hears it will tingle. On that day I will fulfil against Eli all that I have spoken concerning his house, from beginning to end. And I tell him that I am about to punish his house forever, for the iniquity which he knew, because his sons were blaspheming and he did not restrain them. Therefore I swear to the house of Eli that the iniquity of Eli's house shall not be expiated by sacrifice or offering forever."
Samuel lay until morning; then he opened the doors of the house of the Lord. And Samuel was afraid to tell the vision to Eli.
But Eli called Samuel and said, "Samuel, my son."
And he said, "Here I am."
And Eli said, "What was it that he told you? Do not hide it from me. May God do to you and more also, if you hide anything from me of all that he told you." So Samuel told him everything and hid nothing from him. And [Eli] said, "It is the Lord; let Him do what seems good to Him."
And Samuel grew, and the Lord was with him and let none of his words fall to the ground. And all Israel from Dan to Beersheba knew that Samuel was established as a prophet of the Lord. And the Lord appeared again at Shiloh, for the Lord revealed Himself to Samuel at Shiloh by the word of the Lord. And the word of Samuel came to all Israel.
Now Israel went out to battle against the Philistines; they encamped at Ebenezer, and the Philistines encamped at Aphek. The Philistines drew up in a line against Israel, and when the battle spread, Israel was defeated by the Philistines, who slew about four thousand men on the field of battle.
And when the troops came to the camp, the elders of Israel said, "Why has the Lord put us to rout today before the Philistines? Let us bring the ark of the covenant of the Lord here from Shiloh, that He may come among us and save us from the power of our enemies." So the people sent to Shiloh, and brought from there the ark of the covenant of the Lord of hosts, who is enthroned on the cherubim; and the two sons of Eli, Hopni and Phineas, were there with the ark of the covenant of God.
When the ark of the covenant of the Lord came into the camp, all Israel gave a mighty shout, so that the earth resounded.
And when the Philistines heard the noise of the shouting, they said, "What does this great shouting in the camp of the Hebrews mean?" And when they learned that the ark of the Lord had come to the camp, the Philistines were afraid; for they said, "A god has come into the camp!" And they said, "Woe to us! For nothing like this has happened before. Woe to us! Who can deliver us from the wrath of these mighty gods? These are the gods who smote the Egyptians with every sort of plague in the wilderness. Take courage, and acquit yourselves like men, O Philistines, lest you become slaves of the Hebrews as they have been to you; acquit yourselves like men, and fight!"
So the Philistines fought, and Israel was defeated, and they fled, every man to his home; and there was a very great slaughter, for there fell of Israel thirty thousand foot soldiers. And the ark of the Lord was captured; and the two sons of Eli, Hopni and Phineas, were slain.