Judges 10:6

And the children of Israel did evil again in the sight of the LORD, and served Baalim, and Ashtaroth, and the gods of Syria, and the gods of Zidon, and the gods of Moab, and the gods of the children of Ammon, and the gods of the Philistines, and forsook the LORD, and served not him.

The relapse into idol worship described in the verse began to some extent during the latter part of Jair's rule and became general after his death. In days of prosperity Israel forsook the Lord and served Baalim and Ashtaroth together with the gods of Syria and the gods of Zidon and the gods of Moab and the gods of Ammon and the gods of the Philistines. Divine judgment followed closely upon this transgression, with the Ammonites making war from the east and the Philistines from the west. Other nations joined in the oppression until Israel seemed shut in by relentless foes on every side.

Having forsaken God in prosperity, Israel was left as if forsaken by God, not knowing which way to turn for help. This fulfilled the warning given through Joshua that if the heathen nations were not promptly destroyed they would prove as snares for the feet and as thorns in the eyes. When the nation was punished the innocent suffered with the guilty. Yet God still had faithful servants who labored to show Israel its transgressions and that all its troubles resulted from apostasy, though their warnings for a time went unheeded.