After the tribes of Israel heard of a despicable act in the tribe of Benjamin, and that the tribe would not fix the problem, the rest of the tribes sought to remove the problem,
So all the people arose as one man, saying,
“None of us will go to his tent, nor will any turn back to his house; but now this is the thing which we will do to Gibeah: We will go up against it by lot. We will take ten men out of every hundred throughout all the tribes of Israel, a hundred out of every thousand, and a thousand out of every ten thousand, to make provisions for the people, that when they come to Gibeah in Benjamin, they may repay all the vileness that they have done in Israel” (Judges 20:8–10)
As you read the story, it is evident that Israel was brokenhearted over this matter, which shows that they sought to follow the Lord.
Having that kind of thinking the Lord was with them, and helped them.