“Take vengeance against the people of Midyan and afterwards you will be gathered to your nation.” (BeMidbar 31:2)
The closing passages of Parshat Balak provide an introduction to our passage. Women from the nations of Moav and Midyan enter the camp of Bnai Yisrael. These women seduce members of Bnai Yisrael. The heathen women use these illicit relationships to lead their partners into idolatrous practices. Discipline and sexual restraint begin to break down. Ultimately, Zimri – a leader of Shevet Shimon – publicly enters into a romantic liaison with a woman from Midyan. The woman – Kazbi – is a princess of Midyan. Hashem strikes Bnai Yisrael with a plague. Pinchas, the son of Elazar the Kohen, takes action. He executes Zimri and Kazbi. In response to Pinchas’ zealousness, the Almighty ends the plague.
In Parshat Pinchas, Hashem commands Moshe to avenge the evil done by the people of Midyan. Moshe is told to “afflict” Midyan. Now, Hashem seems to repeat this command. He tells Moshe to take vengeance against the people of Midyan. This raises an obvious question. Why did Hashem repeat the command? Why is the command first stated in Parshat Pinchas and then repeated in our parasha?
It seems that each command is unique. The command in Parshat Pinchas does not indicate any specific action. It establishes a relationship. Bnai Yisrael is to view the nation of Midyan as an adversary. Our relationship with Midyan should be predicated upon this assumption. We should assume that the people of Midyan feel animosity towards Bnai Yisrael. We should act aggressively to protect ourselves. However, this command does not include a specific obligation to wage war.
The command in our parasha is more specific. It requires engaging Midyan in war. Moshe is commanded to seek out the people of Midyan and wage war against them.
Our pasuk makes an interesting connection. Hashem tells Moshe that he will die only after completing this task. This implies that Moshe’s involvement is essential. Why is Moshe’s participation important?
In order to answer this question, we must review the Torah’s comments concerning Moshe’s special status. In the final passages of the Torah, Moshe’s uniqueness is described. The Torah writes that no other individual can achieve Moshe’s prophetic level. The Torah also explains that the wonders performed through Moshe exceed those executed through other prophets. These passages teach another important lesson. The pesukim link Moshe’s prophecy to the wonders he performed. Moshe was the greatest prophet. His closeness to the Almighty was reflected in the profound level of his prophecy. This same intimacy allowed Moshe to perform wonders beyond the ability of other prophets.
Based upon the above analysis, Gershonides answers our question. He explains that Moshe could not die until Midyan was destroyed. This is because this war would be fought through the Almighty. Hashem would destroy Midyan through His wonders. Moshe’s participation allowed for the performance of the greatest miracles. No other prophet could destroy Midyan as totally and wondrously.
“And Moshe sent one thousand men from each tribe as an army. And with them was Pinchas the son of Elazar the Kohen as part of the army. And in his hand was the sacred vessels and the trumpets of the teruah.” (BeMidbar 31:6)
This passage presents a problem. Hashem commanded Moshe to destroy Midyan. As we have explained, Moshe’s involvement was crucial. Yet, Moshe did not lead the nation into war. Instead, he sent Pinchas. Why did Moshe, himself, not lead the nation into battle?
Da’at Zekaynim offers two answers to this question. Let us consider each answer. We will begin with the second explanation. Da’at Zekaynim explains that Pinchas had previously executed Kazbi – a princess of Midyan. He had begun to fulfill a mitzvah. Punishing the people of Midyan completed this mitzvah. It is appropriate for the person that initiates a mitzvah to complete it. Therefore, Moshe charged Pinchas with the duty of completing this mitzvah.
This answer presents a problem. According to this interpretation, this war completed a mitzvah initiated by Pinchas. Therefore, Pinchas was chosen to complete the mitzvah he had begun. However, the exact identity of this mitzvah is not clear. Pinchas executed Kazbi because she was publicly engaged in sexual activity with Zimri. The war against Midyan was a response to Hashem’s command to destroy a dangerous enemy. These seem to be two separate commands.
Rav Yitzchak Zev Soloveitchik Zt”l deals with this problem. He explains that a more careful analysis does indicate that a single mitzvah underlies Pinchas’ pervious actions and the war against Midyan. Let us reconsider Rav Soloveitchik’s analysis.
Pinchas acted within the law in executing Zimri and Kazbi. The Torah prohibits sexual relations between Jews and non-Jews. Primarily, this prohibition restricts relations in the context of marriage. However, even casual sexual relations are prohibited. If a liaison is flaunted publicly, a zealot is permitted to execute the parties involved. Pinchas acted within the authority granted by this law. He was such a zealot.
Maimonides points out that the Jew and the non-Jew are not executed for the same reason. The Jew is executed for violating the laws of the Torah. Obviously, non-Jewish partner cannot be punished for this reason. The non-Jew is not obligated to observe the laws of the Torah. Maimonides seems to maintain that the non-Jewish woman is executed because she served as the vehicle of the Jews abandonment of sexual morals.
Maimonides compares the status of this woman to another case. This is the case of an animal involved in an act of bestiality. The animal is destroyed. Clearly, the animal is not responsible to observe the Torah’s laws. It is destroyed because it was involved in an act of sexual depravity. In our case as well, the woman is executed because of her association with immorality.
Maimonides adds another point. In order to understand this comment, a brief introduction is required. Bnai Yisrael defeated Midyan. They executed the men. However, initially they spared the women. Moshe was angered. He observed that these women had corrupted the men of Bnai Yisrael. Maimonides explains Moshe’s objection. Moshe maintained that it was inappropriate to spare these individuals. They were associated with corrupting the sexual morality of Bnai Yisrael.
Based on Maimonides’ comments, Rav Soloveitchik explains that a single mitzvah underlies Pinchas’ initial actions and the war against Midyan. Pinchas executed Kazbi because of her association with Zimri’s corruption. In order to complete this mitzvah, he led Bnai Yisrael in battle against Midyan. The commandment was completed with the execution of the women of Midyan. These women – like Kazbi—were put to death because they were associated with the corruption of Bnai Yisrael.
Now let us consider Da’at Zekaynim’s first answer. The first answer is that Moshe had received a kindness from Midyan. Moshe killed an Egyptian taskmaster. Moshe knew his life was in danger. He fled to Midyan. He remained there until Hashem commanded him to return to Egypt and rescue Bnai Yisrael. Da’at Zekaynim explains that it was inappropriate for Moshe to lead a campaign against Midyan. Midyan had provided him sanctuary. Moshe was obligated in hakarat hatov – acknowledging the benefit that he had received from Midyan. 
This answer presents a problem. Hashem commanded Moshe to wage war against Midyan. The Almighty wanted Moshe to be involved. This involvement was necessary to assure that Midyan would be devastated. This seems to mean that Pinchas was merely Moshe’s proxy. Moshe was the true leader that destroyed Midyan. In short, Moshe did not spare Midyan in any way. How did Moshe demonstrate his hakarat hatov? He destroyed Midyan thoroughly! Where was Moshe’s show of appreciation?
It seems that this answer is based upon a novel understanding of hakarat hatov. We usually, understand hakarat hatov as an obligation to repay a debt. An individual who receives a kindness is obligated to repay the kindness. This interpretation of hakarat hatov confounds us in attempting to understand the position of the Da’at Zekaynim. We can now better define our question. In order to repay a debt, some significant benefit must be proffered. Moshe did not show any mercy towards Midyan. He did not repay his debt through providing a substantial kindness in return.
Apparently, Da’at Zekaynim understands hakarat hatov in a more literal sense. Hakarat hatov means that we are obligated to demonstrate that we recognize receiving a benefit. Generally, the most meaningful act of recognition is to return the kindness. However, sometimes this is not appropriate. Moshe faced this situation. He was commanded to completely destroy Midyan. He could not show mercy. Hashem’s commandment prevented him from returning the kindness he had received.
Nonetheless, the obligation of hakarat hatov applies. Even when we cannot return the kindness we must acknowledge its receipt. Moshe provided this acknowledgement. He refused to personally lead Bnai Yisrael into battle. This was not an act of kindness. However, it was an acknowledgement of the kindness received.
“These are the journeys of Bnai Yisrael that went out from Egypt in their groups through Moshe and Ahron.” (BeMidbar 33:1)
The final parasha of Sefer BeMidbar reviews the travels of Bnai Yisrael in the wilderness. The commentaries are concerned with the inclusion of this material in the Torah. The Torah is written very concisely. The recounting of the journeys in the wilderness seems superfluous.
Rashi explains that these journeys are recounted in order to communicate a key aspect of the wilderness experience. The Almighty had decreed that the nation should spend forty years wandering in the wilderness. Hashem did not constantly move Bnai Yisrael from one location to the next. The nation only traveled forty-two times during the forty years.
This is a fitting conclusion for Sefer BeMidbar. The sefer recounts the changing of the relationship between the Almighty and His nation. This change was brought about by the nation’s refusal to enter the land of Israel. Hashem decreed that Bnai Yisrael should wander in the wilderness for forty years. According to Rashi, these passages capture the nature of this decree.
Maimonides offers an alternative explanation for the description of the various journeys. He explains that the wilderness experience involved a great miracle. The nation was sustained for forty years in a land of complete desolation. The Almighty provided Bnai Yisrael with water, food and all other needs. The generation that experienced these wanderings could recognize the miracle of survival. However, future generations would not have the benefit of experiencing the forty years of wandering. These future generations might not appreciate the extent of this miracle. They might assume that the nation traveled near populated areas. They might believe that the path taken by Bnai Yisrael avoided arid areas. The Torah provides a detailed description of the journey. All of the stations at which the nation camped are enumerated. This route does not pass through populated areas. The path described in the parasha leads through an arid, desolate wilderness. With this information the reader can appreciate the miracles required for Bnai Yisrael’s survival during these forty years.
 Rabbaynu Levi ben Gershon (Ralbag / Gershonides), Commentary on Sefer VaYikra, (Mosad HaRav Kook, 1997), p 142.
 Da’at Zekaynim, Commentary on Sefer BeMidbar 31:6.
 Rabbaynu Moshe ben Maimon (Rambam / Maimonides) Mishne Torah, Hilchot Esurai Beyah 12:4.
 Rav Shimon Yosef Miller, Shai LaTorah (Jerusalem 5755), volume 3, pp. 214-215.
 Da’at Zekaynim, Commentary on Sefer BeMidbar 31:6.
 Rabbaynu Shlomo ben Yitzchak (Rashi), Commentary on Sefer BeMidbar 33:1.
 Rabbaynu Moshe ben Maimon (Rambam / Maimonides) Moreh Nevuchim, volume 3, chapter 50.