Numbers 31:19

Overview - Numbers 31
The Midianites are spoiled, and Balaam slain.
13 Moses is wroth with the officers, for saving the women alive.
19 How the soldiers, with their captives and spoil, are to be purified.
25 The proportion in which the prey is to be divided.
48 The voluntary oblation unto the treasury of the Lord.
Treasury of Scripture Knowledge

Numbers 31:19  (King James Version)
And do ye abide without the camp seven days: whosoever hath killed any person, and whosoever hath touched any slain, purify both yourselves and your captives on the third day, and on the seventh day.

Though the Israelites had acted by the commission of God, yet they had contracted pollution by touching the dead; and the spoil having been used by idolaters, must also be purified in the prescribed manner.
5:2 19:11-22 1 Chronicles 22:8