So the Lord became angry with the Israelites and allowed the Philistines and the Ammonites to defeat them.