The text says that God sold Israel into the hand of the Philistines and the Ammonites. But only the Ammonites are the oppressors in the Jephthah narrative, while the Philistines will be the enemy that Samson must deal with. It is possible that the Jephthah and Samson episodes were contemporaneous.
7 So the anger of the LORD was kindled against Israel, and he sold them into the hand of the Philistines and into the hand of the Ammonites,