The LORD said to Moses,
"Get even with the Midianites for what they did to the Israelites. After that you will join your ancestors [in death]."
Moses said to the people, "Some of your men must get ready to go to war against the Midianites. The LORD will use them to get even with Midian.
Send 1,000 men from each of the tribes of Israel."
So 1,000 men from each tribe were supplied from the divisions of Israel--12,000 men ready for war.
Then Moses sent them off to war, 1,000 men from each tribe along with Phinehas, son of the priest Eleazar. Phinehas took with him the holy articles and the trumpets for the fanfare.
They went to war against Midian, as the LORD commanded Moses, and killed every man.