The ark of the Lord was in the country of the Philistines seven months.
Then the Philistines called for the priests and the diviners and said, "What shall we do with the ark of the Lord? Tell us what we should send with it to its place."
They said, "If you send away the ark of the God of Israel, do not send it empty, but by all means return him a guilt offering. Then you will be healed and will be ransomed; will not his hand then turn from you?"
References for 1 Samuel 6:3
And they said, "What is the guilt offering that we shall return to him?" They answered, "Five gold tumors and five gold mice, according to the number of the lords of the Philistines; for the same plague was upon all of you and upon your lords.
So you must make images of your tumors and images of your mice that ravage the land, and give glory to the God of Israel; perhaps he will lighten his hand on you and your gods and your land.
Why should you harden your hearts as the Egyptians and Pharaoh hardened their hearts? After he had made fools of them, did they not let the people go, and they departed?
Now then, get ready a new cart and two milch cows that have never borne a yoke, and yoke the cows to the cart, but take their calves home, away from them.
Take the ark of the Lord and place it on the cart, and put in a box at its side the figures of gold, which you are returning to him as a guilt offering. Then send it off, and let it go its way.
And watch; if it goes up on the way to its own land, to Beth-shemesh, then it is he who has done us this great harm; but if not, then we shall know that it is not his hand that struck us; it happened to us by chance."
The men did so; they took two milch cows and yoked them to the cart, and shut up their calves at home.
They put the ark of the Lord on the cart, and the box with the gold mice and the images of their tumors.
The cows went straight in the direction of Beth-shemesh along one highway, lowing as they went; they turned neither to the right nor to the left, and the lords of the Philistines went after them as far as the border of Beth-shemesh.
Now the people of Beth-shemesh were reaping their wheat harvest in the valley. When they looked up and saw the ark, they went with rejoicing to meet it.
References for 1 Samuel 6:13
The cart came into the field of Joshua of Beth-shemesh, and stopped there. A large stone was there; so they split up 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 box that was beside it, in which were the gold objects, and set them upon the large stone. Then the people of Beth-shemesh offered burnt offerings and presented sacrifices on that day to the Lord.
When the five lords of the Philistines saw it, they returned that day to Ekron.
These are the gold tumors, which the Philistines returned as a guilt offering to the Lord: one for Ashdod, one for Gaza, one for Ashkelon, one for Gath, one for Ekron;
also the gold mice, according to the number of all the cities of the Philistines belonging to the five lords, both fortified cities and unwalled villages. The great stone, beside which they set down the ark of the Lord, is a witness to this day in the field of Joshua of Beth-shemesh.
The descendants of Jeconiah did not rejoice with the people of Beth-shemesh when they greeted the ark of the Lord; and he killed seventy men of them. The people mourned because the Lord had made a great slaughter among the people.
References for 1 Samuel 6:19
Then the people of Beth-shemesh said, "Who is able to stand before the Lord, this holy God? To whom shall he go so that we may be rid of him?"
So they sent messengers to the inhabitants of Kiriath-jearim, saying, "The Philistines have returned the ark of the Lord. Come down and take it up to you."