Judges 3:2-12 NRS

2 (it was only that successive generations of Israelites might know war, to teach those who had no experience of it before):
3 the five lords of the Philistines, and all the Canaanites, and the Sidonians, and the Hivites who lived on Mount Lebanon, from Mount Baal-hermon as far as Lebo-hamath.
4 They were for the testing of Israel, to know whether Israel would obey the commandments of the Lord, which he commanded their ancestors by Moses.
5 So the Israelites lived among the Canaanites, the Hittites, the Amorites, the Perizzites, the Hivites, and the Jebusites;
6 and they took their daughters as wives for themselves, and their own daughters they gave to their sons; and they worshiped their gods.
7 The Israelites did what was evil in the sight of the Lord, forgetting the Lord their God, and worshiping the Baals and the Asherahs.
8 Therefore the anger of the Lord was kindled against Israel, and he sold them into the hand of King Cushan-rishathaim of Aram-naharaim; and the Israelites served Cushan-rishathaim eight years.
9 But when the Israelites cried out to the Lord, the Lord raised up a deliverer for the Israelites, who delivered them, Othniel son of Kenaz, Caleb's younger brother.
10 The spirit of the Lord came upon him, and he judged Israel; he went out to war, and the Lord gave King Cushan-rishathaim of Aram into his hand; and his hand prevailed over Cushan-rishathaim.
11 So the land had rest forty years. Then Othniel son of Kenaz died.
12 The Israelites again did what was evil in the sight of the Lord; and the Lord strengthened King Eglon of Moab against Israel, because they had done what was evil in the sight of the Lord.