Verses 1-6: Divine Command and Military Preparation. God instructs Moses to avenge Israel against Midian, and Moses selects 1,000 men from each tribe, totaling 12,000, to go to war under the leadership of Phinehas.
Verses 7-12: The Battle and Victory. The Israelites carry out God's command, killing all Midianite males, including their kings and Balaam, and capturing women, children, and livestock. They burn Midianite cities and bring the spoils to Moses and Eleazar.
Verses 13-18: Moses’ Anger and Orders for Purification. Moses rebukes the officers for sparing the women who led Israel into sin. He commands the killing of all males and sexually active women, sparing only virgin girls.
Verses 19-24: Ritual Purification Instructions. Instructions are given for purification of the soldiers, captives, and their belongings, emphasizing ceremonial cleanliness.
Verses 25-41: Division of Spoils and Tribute to the Lord. The spoils are counted and divided between the warriors and the congregation. A tribute is given to the Lord and the Levites receive their portion.
Verses 42-54: Final Accounting and Dedication. The officers report no losses, present a gold offering for atonement, and Moses and Eleazar dedicate the gold in the tabernacle as a memorial before the Lord.