In Numbers 31:18, Moses commands the officers of the army to kill all the women who have had sex and only keep alive the girls who are virgins. What is going here? Why would Moses give this command?
In order to understand this verse, we first have to understand the background. The Midianites, under the counsel of Balaam, devised a plan to cause Yahweh, the God of Israel, to turn against his people. The plan, which was executed in chapter 25 of Numbers, was to seduce Israelite men into fornication (single men) and adultery (married men), and then formal worship of the Midianite gods, especially Baal of Peor.
According to Glenn Miller (Christian Thinktank website), the number of Midianite women involved in this conspiracy would have been 6 to 12,000. Yes, you read that correctly. It would also appear that the Midianite kings and husbands of these women were complicit in the conspiracy. They were willing to send their women into the Israelite camp as prostitutes, essentially, to cause the downfall of Israel.
God does indeed turn against his people, given the sexual and religious crimes they have committed. A plague kills some 24,000 children of Israel. The only reason the plague ends is Phinehas’s quick action to put an end to the sordid affair.
With this background in place, God orders the Israelites to subjugate the Midianites, taking vengeance for their moral atrocities. The Israelites easily win the battle and the army returns with thousands of women captives. At this point, Moses commands the officers to “kill every woman who has slept with a man, but save for yourselves every girl who has never slept with a man.”
It should be clear now that the females who the army has brought back are a mix of women who participated in the conspiracy and young girls who did not. Moses understandably considers the non-virgin women to be directly culpable for the deaths of thousands of Israelites. Setting this aside, they have shown already that they will turn the men of Israel away from Yahweh and toward Baal, causing further death and suffering in the future. These women simply cannot be allowed to survive.
Given Moses’ command, how could the Israelites tell the women apart? Glenn Miller explains that there were simple visual tests that could be applied:
“1) Was the female pre-pubescent? 2) Was the female wearing any attire, jewelry, or adornments required for/associated with virginity for that culture? 3) Was the female wearing any attire, jewelry, or adornments required for/associated with non-virginity for that culture (e.g., veil indicating married status)?”
Because virginity was generally associated with legal proof for blood-inheritance issues in ancient cultures (e.g., land, property, kinship, relationships), virginity itself was often marked by some type of clothing (e.g., the robe of Tamar in 2 Sam 13) or by cosmetic means (cf. the Hindu ‘pre-marriage dot’); as was more typically non-virginal married status (e.g., veils, headwear, jewelry, or certain hairstyles). Of course, non-virginal unmarried status (e.g., temple prostitutes and secular prostitutes) were also indicated by special markings or adornments (e.g. jewelry, dress—cf. Proverbs 7.10; Hos 2.4-5).
The young girls who were virgins would be taken in and cared for by Israelite families, partially to help replace the population of 24,000 who had died by the plague. The young girls would, like all other Israelite women, be married when they matured.