After the close of the campaign against Midian, the warriors returned with rich spoils to the camp of Israel, but they were such pious and honorable men that they did not lay claim to the booty, but rendered it all up, so that it might be impartially divided among all.  As there were honest and conscientious in their relations between man and man, so likewise were they very strict in their observance of religious statutes. Throughout the time of war not a single one of them neglected even the slightest religious ceremony, were it only to put on the phylactery of the forehead before that of the arm.  But they were especially careful never again to be tempted by the Midianite women. If they entered a house to take its treasures from it, they did so in pairs, one blackening the faces of the women, and the other seizing their ornaments. In vain would the Midianite women cry, "Are we not creatures of God, that ye treat us thus?" whereupon the Israelites would say, "Were not ye the cause that so many of us found their death?" Justly therefore could these pious men say to Moses: "Thy servants have taken the sum of the men of war which are under our charge, and not one among us had committed a sin or an unchaste action. We have therefore brought the Lord's oblation to make atonement for our souls." Moses thereupon said in surprise, "Ye contradict yourselves, what need of atonement is there if no man among you is guilty of sin?" They replied: "It is true, our teacher Moses, two by two did we approach the women, one blackening their faces, and the other taking off their ear-rings, but even though we committed no sin with the Midianite women, still the heat of passion was kindled in us when we took hold of the women, and therefore by an offering do we seek to make atonement." Moses thereupon set out to praise them, saying: "Even the common men among you are filled with good and pious deeds, for a man that was under conditions that enabled him to sin, but controlled himself, had done a pious deed, not to speak of the pious and chaste men among you whose pious deeds are legion." 
As among those who had been slain in Midian there was a Jewish apostate, the warriors were polluted, and hence might not enter the camp, but had to stay without. Moses in his meekness did not, however, wait for them to come to him, but hastened to them. When, however, he heard that they had killed only the men but not the women, his wrath was kindled against the leaders of the army, for, "Upon the leaders falls the blame for the faults of the people." He reproached them, pointing out to them that it had been the women who really had brought disaster upon Israel at Shittim. But Phinehas replied: "Our teacher Moses, we acted according to thy instructions, thou didst bid us only 'avenge ourselves of the Midianites,' but madest not mention of the women of Midian."  Moses then ordered them to execute all the women of the Midianites that were ripe for marriage, but to spare the young girls. In order to determine the difference in age, all were led past the gold plate of the mitre on the high priest's forehead, and this had the effect of making those who had been doomed to death grow pale. 
In punishment for Moses' outburst of anger God caused him to forget to communicate to the soldiers outside the camp the laws of purification. These were then announced by Eleazar, Aaron's son. It was not, however, proper for him to pronounce a law in the presence of his teacher Moses, and he was accordingly punished for his lack of reverence to his teacher Moses. God had previously said that whenever Joshua wanted to inquire of God, he was "to stand before Eleazar the priest, and inquire of him by judgement of the Urim and Tummin." But this did not come about. In all his long career, Joshua had no need of asking Eleazar's counsel, so that the latter lost the honor that had been intended from him. 
The occasion that led to the war against Midian had been Israel's seduction by the Midianite women, but these had succeeded only by having first intoxicated the sinners with wine. Phinehas, to make sure that this might not be repeated in the future, put the earthly as well as the heavenly ban upon all those who should drink the wine of the heathens, for the latter used it only as libations to their idols and for immoral purposes. In pronouncing this ban, he called upon the Ineffable Name and upon the holy writing of the two tables against its transgressors.