Isra'el stayed at Sheetim, and there the people began whoring with the women of Mo'av.
These women invited the people to the sacrifices of their gods, where the people ate and bowed down to their gods.
With Isra'el thus joined to Ba'al-P'or, the anger of ADONAI blazed up against Isra'el.
ADONAI said to Moshe, "Take all the chiefs of the people, and hang them facing the sun before ADONAI, so that the raging fury of ADONAI will turn away from Isra'el."
Moshe said to the judges of Isra'el, "Each of you is to put to death those in his tribe who have joined themselves to Ba'al-P'or."
Just then, in the sight of Moshe and the whole community of Isra'el, as they were weeping at the entrance to the tent of meeting, a man from Isra'el came by, bringing to his family a woman from Midyan.
When Pinchas the son of El'azar, the son of Aharon the cohen, saw it, he got up from the middle of the crowd, took a spear in his hand,
and pursued the man from Isra'el right into the inner part of the tent, where he thrust his spear through both of them -the man from Isra'el and the woman through her stomach. Thus was the plague among the people of Isra'el stopped;
nevertheless, 24,000 died in the plague.
ADONAI said to Moshe,
"Pinchas the son of El'azar, the son of Aharon the cohen, has deflected my anger from the people of Isra'el by being as zealous as I am, so that I didn't destroy them in my own zeal.
Therefore say, 'I am giving him my covenant of shalom,
making a covenant with him and his descendants after him that the office of cohen will be theirs forever.'This is because he was zealous on behalf of his God and made atonement for the people of Isra'el."
The name of the man from Isra'el who was killed, put to death with the woman from Midyan, was Zimri the son of Salu, leader of one of the clans from the tribe of Shim'on.
The name of the woman from Midyan who was killed was Kozbi the daughter of Tzur, and he was head of the people in one of the clans of Midyan.
ADONAI said to Moshe,
"Treat the Midyanim as enemies and attack them;
because they are treating you as enemies by the trickery they used to deceive you in the P'or incident and in the affair of their sister Kozbi, the daughter of the leader from Midyan, the woman who was killed on the day of the plague in the P'or incident."