While Israel was staying in Shittim, the men began to indulge in sexual immorality with the daughters of Moab,
who also invited them to the sacrifices for their gods. And the people ate and bowed down to these gods.
So Israel joined in worshiping Baal of Peor, and the anger of the LORD burned against them.
Then the LORD said to Moses, “Take all the leaders of the people and execute them in broad daylight before the LORD, so that His fierce anger may turn away from Israel.”
So Moses told the judges of Israel, “Each of you must kill all of his men who have joined in worshiping Baal of Peor.”
Just then an Israelite man brought to his family a Midianite woman in the sight of Moses and the whole congregation of Israel while they were weeping at the entrance to the Tent of Meeting.
On seeing this, Phinehas son of Eleazar, the son of Aaron the priest, got up from the assembly, took a spear in his hand,
followed the Israelite into his tent, and drove the spear through both of them—through the Israelite and on through the belly of the woman. So the plague against the Israelites was halted,
but those who died in the plague numbered 24,000.
Then the LORD said to Moses,
“Phinehas son of Eleazar, the son of Aaron the priest, has turned My wrath away from the Israelites; for he was zealous for My sake among them, so that I did not consume the Israelites in My zeal.
Declare, therefore, that I am granting him My covenant of peace.
It will be a covenant of permanent priesthood for him and his descendants, because he was zealous for his God and made atonement for the Israelites.”
The name of the Israelite who was slain with the Midianite woman was Zimri son of Salu, the leader of a Simeonite family.
And the name of the slain Midianite woman was Cozbi, the daughter of Zur, a tribal chief of a Midianite family.
And the LORD said to Moses,
“Attack the Midianites and strike them dead.
For they assailed you deceitfully when they seduced you in the matter of Peor and their sister Cozbi, the daughter of the Midianite leader, the woman who was killed on the day the plague came because of Peor.”