Numbers 31 is the 31st chapter of the Book of Numbers, the fourth book of the Pentateuch (Torah), the central part of the Hebrew Bible (Old Testament), a sacred text in Judaism and Christianity. Scholars such as Israel Knohl and Dennis T. Olson name this chapter the War against the Midianites. Numbers 31, set in the southern Transjordanian regions of Moab and Midian, narrates how an army of Israelite soldiers commanded by Phinehas (commissioned by Moses and Phinehas' father Eleazar) waged a war against the Midianites, killing all men and boys including their five kings, and taking all livestock, women and girls captive. Moses instructed the soldiers to kill all women who had ever had sex with a man, and to keep the women and girls who were still virgins for themselves. The spoils of war were then divided between the Israelite civilians, soldiers and the god Yahweh. Much scholarly and religious controversy exists surrounding the authorship, meaning and morality of this chapter of Numbers. It is closely connected to Numbers 25. Documentary hypothesis The majority of modern biblical scholars believe that the Torah (the books of Genesis, Exodus, Leviticus, Numbers, and Deuteronomy, written in Classical Hebrew) reached its present form in the post-Exilic period (i.e., after c.520 BCE), based on pre-existing written and oral traditions, as well as contemporary geographical and political realities. Numbers is a Priestly redaction (i.e., editing) of a non-Priestly original. Scholars generally recognise that mentions of the Midianites in chapters Numbers 22–24 are secondary Priestly (P) additions. They also generally agree that Numbers 25:1–5 contains an earlier version of the story involving the women of Moab, for which the Israelite chiefs are punished by the judges. This earlier version was later augmented by the account in Numbers 25:6–18 with the Midianite women and Phinehas' priesthood as their new focus, perhaps using elements from Psalm 106:28–31 to work with.