Immediately after Bil’am returned home, the Torah vilifies the Israelites for acting licentiously with the native Moabite women. God becomes infuriated with them and commands Moses to “take the heads of all the nation and hang them in the presence of the sun, and then God’s wrath will recede.” Either at this point, or some time near in the narrative, a plague engulfs the people, eventually dispatching 24,000 lives. While God might be really emotionally angry, it seems clear from this verse that ‘God’s wrath’ is synonymous with the plague’s assault. And the implication of the verse’s end is that when God’s wrath would be quelled, the plague would cease.
Yet, when Moses fulfills God’s command, the plague does not stop. In fact, not until Pinḥas – vigilante style – executes Zimri (the Israelite) and Cozbi (the Midianite) does the plague end. Truth be told, Moses should not have been surprised that the plague raged on even after he directed the Israelite judges to carry out God’s instruction. This is because God tells Moses to hang the leaders publicly, but what does Moses do? “Moses commands the Israelite judges: let each man kill those people that are attached to Ba’al Pe’or.” How Moses chooses to execute God’s command is bewildering. God says hang. Moses says kill. God says execute the “heads of all the people.” Moses says execute those people attached to idolatry. God says execute publicly. Moses omits any mentioned of this point. Even though the verse with God’s command to Moses immediately precedes the verse that details how Moses carried out the order, it is hard to believe that Moses even heard God’s command based on how he subsequently acts!
There is no doubt that Moses interpreted God’s command as he assumed God wanted it carried out. Apparently, Moses found it difficult to believe that God wanted to publicly execute the heads of the people. They may not all have even been involved in the crime, he could have reasoned, so why should they all be killed? Rather, Moses interpreted God to imply that the Israelite judges should judge which people were attached to idolatry, and therefore already committed some heinous sins, and only those people should be executed. Yet, it appears that that is not what God wanted. God wanted to give the people a powerful message by executing those “heads.” In fact, it was God – through the plague – that would execute those that He deemed fit to die. Moses’ job was simply to publicly hang the leaders for allowing the people to be led astray towards the Moabite women and idolatry. This is why the leaders need be hanged. This is why it should be done publicly (neged ha-ṣhemeṣh). This is why it only applied to the leaders. And this is why the plague did not end with the judges executing the people attached to ba’al pe’or. (if that in fact happened before Pinḥas jumped in).
Instead the plague was halted with the spontaneous execution of Zimri and Cozbi. When the slaying takes place, it is not clear why the plague stops. But at the beginning of the next chapter of the Torah, we learn that the “Israelite man” whom Pinḥas had executed was none other than Zimri ben Salu, leader of one of the ancestral families of Ṣim’on, AKA, a prince. And the “Midianite woman” Pinḥas executed was none other than Cozbi the daughter Ẓur, leader of one of the ancestral peoples of the Midianites, AKA, a princess. Once we learn those two interesting facts, it is clear why the plague stopped. God needed a lesson to be taught; he needed the leaders to be punished in order for the nation to learn to not follow their example when they lead the nation towards idolatry. Moses was not carrying out God’s command by appointing judges to adjudicate the sinners. But, when Pinḥas gathered the gumption to javelin style slay the inter-faith pair, the message that the leaders have led the Israelites astray was clear, and the command to Moses no longer had to be carried out. Indeed, it was carried out. So, the plague stopped.
Nonetheless, it has to strike us as a bit strange that Zimri was strolling around with his non-Jewish girlfriend after Moses commanded the Israelite judges to execute those people attached to Ba’al Pe’or. In general, it is noteworthy that Jews are taught from their youth that Zimri was the perennial jerk: a ḥuẓpenyak! Moses commands that people like him need to be killed, and what Zimri do: he goes and flaunts, with unabashed audacity, his ṣiqẓa in front of the masses: what a jerk! But, this is not what took place.
What the verse actually says is that an Israelite escorted (brought near) a non-Jewish woman to his brothers in front of everybody. On the one hand, he might have done this to flout his relationship in their faces, but on the other hand, the verse continues and says: “they were crying in front of the Meeting Tent.” Rashi explains that everyone (the Israelites) cried because Moses forgot the law. Is this to imply that everyone was crying because they noticed that Moses did not remember the law? How did they know that he did not remember the law? Was it that clear? Did they know the law, and therefore it was obvious Moses did not know the law? It seems more reasonable for Rashi to opine that Moses himself and the Israelites were crying when they witnessed this aberration carried out by Zimri. Nonetheless, as opposed to Moses or the whole of the Israelite people, it seems more plausible that Zimri and Cozbi in fact were the ones crying. Why would they weep? Let us not forget that Moses just issued a ruling that all the judges of Israel need to identify, judge and execute those attached to foreign women and idolatry. If this is the case, wouldn’t it make sense for “Zimri to come and escort the Midianite woman to his brothers, Moses and all the Israelites”? Would it not be appropriate for them to both cry, in “front of the Meeting Tent”, where Moses and the other leaders would regularly judge, and plead his case, plead for the woman he loves, plead for the woman he is attached to? Especially if we take the Torah’s diction seriously when it says they became “attached” to this idolatry, to this people, to their gods, to their offerings!
Cozbi and Zimri cried in a sincere plea for their relationship to last. Pinḥas responds by executing them both. Ḥazal ascribe more miracles to Pinḥas’ actions than to almost any other occurrence in the Bible. I believe this is the case because they were worried. Worried that Pinḥas would be perceived as an unjustified, uncaring hothead, even with the Divine blessing vindicating his action described in the Torah’s next chapter. Pinḥas’ action was not special because Moses forgot the law; it was not special because he stood up to two tribal leaders; it was special because he stood against true love, and the pain and anguish of two people who begged the people and cried for pity, and he executed them. And, because two leaders were killed, God stopped the plague. With mercy and pity for the other way of life, the plague would continue. As long as Moses took pity on the leaders and only executed those directly connected to idolatry, and as long as the nation did not see, first hand, that the Moabite and Midianite lifestyle was a cancer for the nascent Israelite people, the plague needed to continue, because one way or another, that way of life was death to the Jews.
 ‘Kill’ is also used by the sin of the Golden Calf and there it is clear that punishment was meted out by the edge of the sword.
 When the verse says “across from the sun” (neged ha-ṣhemeṣh), the best interpretation is probably “publicly.”
 When the text says “take heads of the whole nation,” there are two options what this can mean: on the one hand, this might refer to the heads of those people that are attached to idolatry. In other words, Moses was commanded to execute the Israelite leaders that led the nation to attach to ba’al pe’or. These people were not inherently leaders of the nation. There were leaders in this one area, namely, leaders in the area of making Israelites feel connected to idolatry. Similarly, when the Israelites choose to rebel and suggest forming a group to head back to Egypt, they say “let us appoint a head (Rosh).” So, a ‘Rosh’ is not a judge, or a navi, or tribal head. A “Rosh’ is someone who just happens to be the leader of a group. On the other hand, when the text says “take heads of the whole nation,” God might be commanding Moses to execute the tribal heads. Moses does not take interpret God’s command in either of these two aforementioned ways.
 Rashi even explains how Moshe could have construed God’s message: “Take the heads of the nation” means “collect the Israelite judges to pass judgment on the idolaters.” Hang them “across from the sun” means investigate the matter (as clearly as the sun shines).
 Either Zimri was a leader of the people and should have been executed (from God’s perspective), or he was one of those who became attached to idolatry, and should have been killed (from Moses perspective).
 Many people interpret the verse that Pinchas slew the two by stabbing them both through the belly. Indeed, Rashi connect the words ‘Qubah’ to stomach (Qeivah). Yet, in one verse, Rashi interprets the same word as both ‘tent’ and ‘stomach.’ This seems unlikely. While it is a tough verse to translate, I think a better translation is: “he went after the man of Israel to the tent. He pierced both of them: the man of Israel, and the woman, to her tent. So the plague was stayed from the children of Israel.” In other words, after they all met at Tent of Meeting, Cozbi returned to her tent. Pinchas went there and killed her.