1While Israel lived at Shittim, the people began to have illicit relations with the women of Moab. 2The women invited the people to the sacrifices of their gods, and the people ate and bowed down to their gods. 3So Israel joined itself to Baal of Peor, and the anger of the LORD burned against Israel.
4The LORD said to Moses, “Take all the leaders of the people and expose them before the LORD in the sun, so that the fierce anger of the LORD may turn away from Israel.” 5So Moses said to the judges of Israel, “Each of you kill the men under you who have joined themselves to Baal of Peor.”
6Just then an Israelite man came and brought a Midianite woman to his brothers in the sight of Moses and the whole congregation of Israel, while they were weeping at the entrance of the tent of meeting. 7When Phinehas son of Eleazar, son of Aaron the priest, saw it, he rose from among the congregation and took a spear in his hand. 8He followed the Israelite man into the inner chamber and pierced them both, the Israelite man and the woman, piercing her through the belly. Then the plague was stopped among the Israelites. 9Those who died in the plague were twenty-four thousand.
10The LORD spoke to Moses, saying, 11“Phinehas son of Eleazar, son of Aaron the priest, has turned my wrath away from the Israelites by showing my zeal among them, so that I did not consume the Israelites in my zeal. 12Therefore say, ‘I am giving him my covenant of peace. 13It will be for him and his offspring after him a covenant of a perpetual priesthood, because he was zealous for his God and made atonement for the Israelites.’”
14The name of the slain Israelite man, who was killed with the Midianite woman, was Zimri son of Salu, a leader of a father's household among the Simeonites. 15The name of the slain Midianite woman was Cozbi daughter of Zur, who was head of the clans of an ancestral household in Midian.
16The LORD spoke to Moses, saying, 17“Treat the Midianites as enemies and strike them, 18for they have treated you as enemies by their schemes, which they used against you in the matter of Peor and in the matter of Cozbi, their sister, the daughter of a Midianite leader, who was killed on the day of the plague because of Peor.”
19The plague was over.