Numbers 31:6
And Moses sent them to the war, a thousand of every tribe, them and Phinehas the son of Eleazar the priest, to the war, with the holy instruments, and the trumpets to blow in his hand. And Moses sent them to the war, a thousand of every tribe, them and Phinehas the son of Eleazar the priest, to the war, with the holy instruments, and the trumpets to blow in his hand.
God's command to avenge Israel upon the Midianites was promptly obeyed, with Moses sending a thousand men of every tribe to the war under Phinehas the son of Eleazar the priest, carrying the holy instruments and the trumpets to blow in his hand. The campaign was not undertaken to gratify malice or revenge, for Israel acted only as chosen instruments to execute God's judgment, moved by zeal for His glory. In it were seen both justice in punishing the guilty and mercy in granting Israel victory over those who sought its destruction.
The battle was fought as the Lord commanded Moses. The Israelites slew the kings of Midian. They also slew Balaam, and at Moses's command the captive women were put to death as the most guilty and dangerous enemies of Israel.