Now the Philistines had taken the ark of God, and they brought it from Ebenezer to Ashdod.
"The Philistines carried it (the ark of God) from Ebenezer to Ashdod"  (1 Samuel 5:1).  The great leader of the conquest, Joshua, removed the ark from Gilgal to Shiloh which was located within the territory allotted to Ephraim, evidently because Joshua was a member of that tribe.