Therefore the children of Israel could not stand before their enemies, but turned their backs before their enemies, because they were accursed: neither will I be with you any more, except ye destroy the accursed from among you.
So, the Israelites couldn't fight their enemies because they were cursed and running away. God also said he would leave them unless they get rid of the cursed people.