31:1 The Lord spoke to Moses, saying, 2 “Avenge the people of Israel on the Midianites. Afterward you shall be gathered to your people.” 3 So Moses spoke to the people, saying, “Arm men from among you for the war, that they may go against Midian to execute the Lord's vengeance on Midian. 4 You shall send a thousand from each of the tribes of Israel to the war.” 5 So there were provided, out of the thousands of Israel, a thousand from each tribe, twelve thousand armed for war. 6 And Moses sent them to the war, a thousand from each tribe, together with Phinehas the son of Eleazar the priest, with the vessels of the sanctuary and the trumpets for the alarm in his hand. 7 They warred against Midian, as the Lord commanded Moses, and killed every male. 8 They killed the kings of Midian with the rest of their slain, Evi, Rekem, Zur, Hur, and Reba, the five kings of Midian. And they also killed Balaam the son of Beor with the sword. 9 And the people of Israel took captive the women of Midian and their little ones, and they took as plunder all their cattle, their flocks, and all their goods. 10 All their cities in the places where they lived, and all their encampments, they burned with fire, 11 and took all the spoil and all the plunder, both of man and of beast. 12 Then they brought the captives and the plunder and the spoil to Moses, and to Eleazar the priest, and to the congregation of the people of Israel, at the camp on the plains of Moab by the Jordan at Jericho.
13 Moses and Eleazar the priest and all the chiefs of the congregation went to meet them outside the camp. 14 And Moses was angry with the officers of the army, the commanders of thousands and the commanders of hundreds, who had come from service in the war. 15 Moses said to them, “Have you let all the women live? 16 Behold, these, on Balaam's advice, caused the people of Israel to act treacherously against the Lord in the incident of Peor, and so the plague came among the congregation of the Lord. 17 Now therefore, kill every male among the little ones, and kill every woman who has known man by lying with him. 18 But all the young girls who have not known man by lying with him keep alive for yourselves. 19 Encamp outside the camp seven days. Whoever of you has killed any person and whoever has touched any slain, purify yourselves and your captives on the third day and on the seventh day. 20 You shall purify every garment, every article of skin, all work of goats' hair, and every article of wood.”
21 Then Eleazar the priest said to the men in the army who had gone to battle: “This is the statute of the law that the Lord has commanded Moses: 22 only the gold, the silver, the bronze, the iron, the tin, and the lead, 23 everything that can stand the fire, you shall pass through the fire, and it shall be clean. Nevertheless, it shall also be purified with the water for impurity. And whatever cannot stand the fire, you shall pass through the water. 24 You must wash your clothes on the seventh day, and you shall be clean. And afterward you may come into the camp.” (ESV)