Judges 11:17
Then Israel sent messengers unto the king of Edom, saying, Let me, I pray thee, pass through thy land: but the king of Edom would not hearken thereto. And in like manner they sent unto the king of Moab: but he would not consent: and Israel abode in Kadesh.
The verse belongs to the history of Jephthah's conflict with the Ammonites. That deliverance followed Israel's putting away of its idols and returning to serve the Lord. In response God heard their prayers and began to work for their help. Under Jephthah Israel then overcame the Ammonites after eighteen years of oppression.