Now the ark of the Lord was in the country of the Philistines seven months.
And the Philistines called for the priests and the diviners, saying, "What shall we do with the ark of the Lord? Tell us how we should send it to its place."
So they said, "If you send away the ark of the God of Israel, do not send it empty; but by all means return it to Him with a trespass offering. Then you will be healed, and it will be known to you why His hand is not removed from you."
Then they said, "What is the trespass offering which we shall return to Him?" They answered, "Five golden tumors and five golden rats, according to the number of the lords of the Philistines. For the same plague was on all of you and on your lords.
Therefore you shall make images of your tumors and images of your rats that ravage the land, and you shall give glory to the God of Israel; perhaps He will lighten His hand from you, from your gods, and from your land.
Why then do you harden your hearts as the Egyptians and Pharaoh hardened their hearts? When He did mighty things among them, did they not let the people go, that they might depart?
Now therefore, make a new cart, take two milk cows which have never been yoked, and hitch the cows to the cart; and take their calves home, away from them.
Then take the ark of the Lord and set it on the cart; and put the articles of gold which you are returning to Him as a trespass offering in a chest by its side. Then send it away, and let it go.
And watch: if it goes up the road to its own territory, to Beth Shemesh, then He has done us this great evil. But if not, then we shall know that it is not His hand that struck us--it happened to us by chance."
Then the men did so; they took two milk cows and hitched them to the cart, and shut up their calves at home.
And they set the ark of the Lord on the cart, and the chest with the gold rats and the images of their tumors.
Then the cows headed straight for the road to Beth Shemesh, and went along the highway, lowing as they went, and did not turn aside to the right hand or the left. And the lords of the Philistines went after them to the border of Beth Shemesh.
Now the people of Beth Shemesh were reaping their wheat harvest in the valley; and they lifted their eyes and saw the ark, and rejoiced to see it.
Then the cart came into the field of Joshua of Beth Shemesh, and stood there; a large stone was there. So they split the wood of the cart and offered the cows as a burnt offering to the Lord.
The Levites took down the ark of the Lord and the chest that was with it, in which were the articles of gold, and put them on the large stone. Then the men of Beth Shemesh offered burnt offerings and made sacrifices the same day to the Lord.
So when the five lords of the Philistines had seen it, they returned to Ekron the same day.
These are the golden tumors which the Philistines returned as a trespass offering to the Lord: one for Ashdod, one for Gaza, one for Ashkelon, one for Gath, one for Ekron;
and the golden rats, according to the number of all the cities of the Philistines belonging to the five lords, both fortified cities and country villages, even as far as the large stone of Abel on which they set the ark of the Lord, which stone remains to this day in the field of Joshua of Beth Shemesh.
Then He struck the men of Beth Shemesh, because they had looked into the ark of the Lord. He struck fifty thousand and seventy men of the people, and the people lamented because the Lord had struck the people with a great slaughter.
References for 1 Samuel 6:19
And the men of Beth Shemesh said, "Who is able to stand before this holy Lord God? And to whom shall it go up from us?"
So they sent messengers to the inhabitants of Kirjath Jearim, saying, "The Philistines have brought back the ark of the Lord; come down and take it up with you."