While Israel camped at Shittim, the men began to fall into sin with Moabite women. These women invited them to the sacrifices of their gods, and soon the Israelites were eating and bowing down before the idols of Moab. They joined in worshiping Baal of Peor, and the Lord's anger blazed against them.
The Lord said to Moses, "Take all the leaders of the people and execute them in broad daylight before the Lord, so that My fierce anger may turn away from Israel." So Moses ordered the judges of Israel, "Each of you must put to death those of your men who have worshiped Baal of Peor."
But while the people were weeping at the entrance of the Tent of Meeting as the judges were still carrying out Moses's order, an Israelite man brazenly brought a Midianite woman into his family's tent—right before the eyes of Moses and all the congregation.
When Phinehas, the son of Eleazar and grandson of Aaron the priest, saw this, he rose from the assembly, took a spear in his hand, and followed them into the tent. There, he drove the spear through both of them—the man and the woman—and the plague that had struck Israel immediately stopped. But twenty-four thousand had already died.
Then the Lord spoke to Moses and said, "Phinehas, son of Eleazar and grandson of Aaron, has turned My anger away from the Israelites because he was as zealous for My honor as I am. Because of his zeal, I did not destroy Israel in My wrath. Therefore, tell him that I am making with him My covenant of peace. He and his descendants will have a lasting priesthood, for he was zealous for his God and made atonement for Israel."
The Israelite man who was slain was Zimri son of Salu, a leader from the tribe of Simeon. The Midianite woman was Cozbi, daughter of Zur, a tribal chief of Midian.
Then the Lord said to Moses, "Treat the Midianites as enemies and destroy them, for they deceived you in the matter of Peor and through their woman Cozbi, daughter of their leader, who was killed when the plague came because of Peor."
