1 Samuel 5:11

So they sent and gathered together all the lords of the Philistines, and said, Send away the ark of the God of Israel, and let it go again to his own place, that it slay us not, and our people: for there was a deadly destruction throughout all the city; the hand of God was very heavy there.

At Ekron the sufferers gathered together all the lords of the Philistines and pleaded that the ark of the God of Israel be sent away to its own place in Israel, so that it would not kill them and their people. The deadly destruction throughout the city and the very heavy hand of God upon it were God's judgment for taking and keeping the ark. Those who did not die were smitten with emerods, and the cry of the city went up to heaven.

The destruction followed the ark wherever it was carried, for disease first struck Ashdod and continued when the ark was removed to Gath and then to Ekron. Besides disease, mice marred the produce of the land and injured its food supply, so that the nation was threatened with famine as well as disease. The divine presence attended the ark, and by that presence God brought terror and destruction upon the Philistines because they had transgressed His holy law.

The rulers acted from fear that the fatal destruction would slay them and their people, and they were driven by that fear to return the ark with a trespass offering. The Philistine triumph over Israel was only temporary, for God can use Israel's enemies to punish its unfaithfulness and then bring those enemies themselves into judgment, so that wherever iniquity is cherished divine judgment follows.