"And the congregation sent 12,000 of the valiant warriors there, and commanded them, saying, 'Go and strike the inhabitants of Jabesh-gilead with the edge of the sword, with the women and the little ones,'" (Judges 21:10).
As with so many difficult issues concerning the word of God, context is hugely important. In Judges 19:22-30, the wicked men of Gibeah (a city in Israel of the tribe of Benjamin, 1 Sam 13:15) demanded sexual relations with the Levites who were staying at a house in that city. The owner of the house, to his utter shame, offered his virgin daughter and the Levite's concubine. Both the man and the Levite should have defended the women even to their deaths, but they both failed miserably in their moral duty. Nevertheless, the men of the city took the concubine, sexually abused her all night, and then released her. She died at the door of the house in which the Levite rested.
In the morning when the Levite discovered his concubine's body, he put her on his donkey, went home, took a knife, cut her into 12 pieces, and sent the body parts throughout all of Israel. "While this is difficult for modern readers to understand (as well as for the Levite’s contemporaries; Judges 19:30; cf. Hosea 9:9), he meant to arouse the nation to action by calling for a national judicial hearing. Perhaps he was charging them with the responsibility of removing the bloodguiltiness that rested on the entire nation for his concubine’s death."1 The response of Israel to this incredibly horrible act was to gather at Mizpah "as one man."
The Levite explained the circumstances of his concubine's death and asked the people of Israel what to do. They then decided to go against Gibeah in retribution.
The people of Israel asked those of Gibeah to deliver into their hands those who had performed this wickedness so that they might remove the evil from the land of Israel. Gibeah, which was of the tribe of Benjamin, refused (Judges 20:13). Civil war ensued and Benjamin was defeated. Then, "in researching their secondary problem (cf. v20:5), the Israelites discovered that no one from the town of Jabesh Gilead (located about nine miles southeast of Beth Shan and two miles east of the Jordan River) had responded to the call to Mizpah."2 Therefore, Israel wiped out the inhabitants of Jabesh-gilead, all of them except for 400 virgins and 600 men -- so that their name might not be utterly destroyed. Like it or not, that was the battle and the reality of war in ancient Israel.