The word of Samuel came to all Israel. Now Israel went out against the Philistines to battle, and encamped beside Ebenezer: and the Philistines encamped in Aphek.
The notion advanced by the elders of Israel that the presence of the ark of the covenant in their midst would assure them of victory could not possibly have been derived from any other source than the earlier Book of Moses (the Pentateuch) and that of Joshua.  Their fatal mistake in this was that God was leading Israel in those earlier victories, but, in this case, they were not following any divine commandment.  They had consulted no prophet.  They merely decided to utilize the ark of the covenant as a talisman or fetish in exactly the same superstitious manner that the pagans used similar devices supposed to represent their pagan deities.  It is no wonder that it proved to be a futile maneuver.