When the people's shamelessness became more and more widespread, God commanded Moses to appoint judges to punish the sinners, and as it was difficult to discover these through the agency of witnesses, God marked them by causing the cloud of glory that lay spread over the camp of Israel to disappear from the sinners. Those that were not covered by the cloud of glory were thus clearly marked as sinners.  God appointed as judges and executioners the seven myriads eight thousand six hundred officers of the people, giving them the order that each of them execute two sinners.  These carried out Moses' command and stoned the sinners, whose corpses then hung upon the gallows for a few minutes. This was the legal punishment, for these sinners had not only committed whoredom with the women of Moab, but had worshipped the Moabit idol Peor; and idolatry is punishable with death by stoning. 
While the judges administered their stern offices, the tribe of Simeon approached their prince, Zimri, and said to him, "People are being executed, and thou sittest still as if nothing were going on." He thereupon took with him twenty-four thousand men, and betook himself to Cozbi, Balak's daughter, and without considering God or men, he requested her in the presence of many people to yield herself to him, to satisfy his evil desires. Now Balak had ordered his daughter Cozbi to employ her beauty only for the sake of enticing Moses, thinking, "Whatever evil may be decreed by God against Israel, Moses will be brought to naught, but if my daughter should succeed in seducing him to sin, then all Israel will be in my hand." Hence Cozbi said to Zimri: "My father ordered me to be obedient to the wishes of Moses alone, and to none other; for he is a king, and so is my father, and a king's daughter is fit for none but a king." Zimri, however, replied: "I am a greater man the Moses, for he is chief only of the third tribe of Israel, whereas I am prince of the tribe of Simeon, the second of the Israelite tribes, and if thou wilt, I will convince thee that I am a greater man than Moses, for I will take thee to myself in his presence, without paying attention to his prohibition."
Zimri then seized Cozbi by the locks of her hair, and brought her before Moses, whom he then addressed as follows: "Tell me, son of Amram, is this woman permitted me, or is she forbidden me?" Moses said, "She is forbidden to thee." Zimri answered: "Art thou really the faithful expounder of the Torah, whose reliability God praised with the words, 'He is faithful in all Mine house?' How then canst thou assert that she is forbidden me, for then thy wife would be forbidden to thee, for she is a Midianite like this woman, and this one is a noble woman of a noble family, whereas thy wife is the daughter of an idolatrous priest." At those words, Moses, Eleazar, and the elders began to weep, for they knew not how to make answer to Zimri's insolent words, nor what they could do to restrain this sinner from the accomplishment of his sin. God said to Moses: "Where is thy wisdom? Thou didst need to utter only one word, and Korah and all his company were swallowed by the earth. Canst thou now do nothing better than to weep?" The Holy Spirit exclaimed at Moses' perplexity and silence, "The stouthearted are spoiled, they have slept their sleep." 
God, who calls the pious to strict account, punished Moses for the lack of decision that he displayed on this occasion, by leaving his burial-place unknown to mankind.  While Moses and other pious men were irresolute and deliberated whether or not Zimri deserved death, Phinehas said to Moses: "O my great-uncle, didst thou not teach me, when thou didst return from Mount Sinai, that is was the zealot's task for the sake of God's law to slay those who commit unchastity with non-Jewish women?" Phinehas took the liberty of pointing out the law to his teacher Moses who had forgotten it, because, "when God's name is profaned, no man should consider the respect due to a teacher," wherefore Phinehas thought now only of establishing God's law, and in doing this it was necessary to recall it to Moses' mind. Moses indeed did not take it all amiss, but said to Phinehas, "Let the reader of the letter be its bearer also," words by which he called upon Phinehas himself to visit punishment upon the sinners. 
Phinehas was now for a time in doubt whether he should dare to punish the sinners, for it was to be expected that he would eventually meet his death in this way, being one against two, Zimri and his mistress Cozbi. When, however, the plague that God had sent upon Israel on account of their sins spread more and more rapidly, Phinehas determined to risk his life in trying to kill the sinners. "For," said he to himself, "the horse goes willingly into battle, and is ready to be slain only to be of service to its master. How much more does it behoove me to expose myself to death in order to sanctify God's name!"  He found himself all the more impelled to act thus because he could not well leave the punishment of the sinners to others. He said: "The tribe of Reuben can effect nothing in this instance, because their grandsire Reuben was himself suspected of an unchaste action; nothing is to be expected from the tribe of Simeon, for it follows the sinful example of its prince Zimri; the tribe of Judah cannot well be of use in this matter, because their grandsire Judah committed unchastity with his daughter-in-law Tamar; Moses himself is doomed to impotence because his wife Zipporah is a Midianite woman. Hence there remains nothing but for me to interpose."