When the ark of the LORD had been in Philistine territory for seven months,