Deuteronomy 20:14
But the women, and the little ones, and the cattle, and all that is in the city, even all the spoil thereof, shalt thou take unto thyself; and thou shalt eat the spoil of thine enemies, which the LORD thy God hath given thee. But the women, and the little ones, and the cattle, and all that is in the city, even all the spoil thereof, shalt thou take unto thyself; and thou shalt eat the spoil of thine enemies, which the LORD thy God hath given thee.
Moses recalled this law to Israel before they crossed the Jordan into the promised land. It governs taking the women and the little ones and the cattle and all that is in a captured city, even all its spoil, as spoil given by God to be taken and used. The women and children spared under it were reserved for adoption into Israelite families. Together with the regulations in Deuteronomy 21:10-14, it prohibited making a captive woman a slave if her captor afterward repudiated her.