We will begin to shed some light on the subject by introducing the text from this week’s parsha (Bamidbar 21, 14):
About this, it will be said in the sefer of the wars of Hashem: “That which was given at the Sea of Reeds and the valleys of Arnon; and the outpouring of the valleys when it veered to dwell at Ar and leaned against the border of Moav. And from there to the well; it is the well of which Hashem said to Moshe, ‘Assemble the people and I shall give them water.’” Then Yisrael sang this song: “Come up O well, call out to it.”
Rashi— ר'בן ש'ל י'שראל—Yisrael’s teacher—interprets these pesukim based on the Midrash—that these pesukim refer to a great miracle that was performed on Yisrael’s behalf. On their way to enter Eretz Yisrael, they passed through the valley of Arnon, which passes between two mountains—one mountain which is located in Eretz Yisrael in the territory of the Emorim, and the other, opposite it, located in the land of Moav. The Emorim hid in caves in the mountain waiting to ambush Yisrael. Miraculously, the two mountains converged, crushing the Emorim between them. Here is a summary of Rashi’s sacred comments:
When they tell of miracles performed on behalf of our forefathers, they will also relate this event. Just as they tell of the miracles that occurred at Yam Suf, so, too, they will tell of the miracles of the valleys of Arnon; for here, too, great miracles were performed. The blood of the Emorim—who lay in wait, hiding—was spilled there.
The mountains there were high and the valley deep and narrow; so that the mountains were very close to one another. Yisrael’s path passed through this valley. The Emorim’s plan was to hide in the caves above and to come out and kill the people of Yisrael with arrows and catapult stones, as they attempted to pass through the valley. The mountains on the side of Moav contained caves; the Emorim hid in these caves. The mountains on the opposite side of the valley contained hornlike projections protruding outwards, aligned opposite the caves. When Yisrael came to pass through the valley, the mountain on the Eretz Yisrael side drew closer to the mountain on the side of Moav; the projections entered the corresponding caves and crushed those hiding inside them.
This miracle is only alluded to in the pesukim. At the time, the people of Yisrael were unaware of what had transpired. Yet, after they passed through the valley, the waters of the well flowed through the valley—bringing up the blood, the arms, and the limbs of the enemy that was killed. When Yisrael saw the evidence of this miracle in their camp, they broke out in a song of praise: “Come up, O well”—bring forth from the valley the evidence of the miracle that took place.
In the sefer of the wars of Hashem Refers to the War of Torah
According to the simple, straightforward interpretation of the words: "את והב בסופה"—that which was given at the Sea of Reeds—the passuk is referring to the crushing of the Emorim by these two mountains. Yet, in the Gemara (Kiddushin 30b), Chazal elucidate this passuk as referring to the peaceful and loving relationship that exists between “talmidei-chachamim.” They provide us with a similar elucidation with regards to the passuk (Tehillim 127, 5):
"לא יבושו כי ידברו את אויבים בשער. מאי את אויבים בשער, אמר רבי חייא בר אבא, אפילו האב ובנו, הרב ותלמידו, שעוסקין בתורה בשער אחד, נעשים אויבים זה את זה, ואינם זזים משם עד שנעשים אוהבים זה את זה, שנאמר את והב בסופה, אל תקרי בסופה אלא בסופה".
“They shall not be shamed when they speak with enemies in public places (literally: at the gate).” Who are the “enemies at the gate” referred to by the passuk? Rabbi Chiya bar Abba said: Even a father and his son, a Rav and his pupil, who are engaged in Torah-study at the same gate (in the same place of study); they become each other’s adversaries; and they do not move from there until they become devoted friends of one another, as it states (Bamidbar 21, 14): “That which was given at the Sea of Reeds”—do not read this as “bisoofah” (on the Yam Suf ) but rather as “bisofah” (“in the end”).
Now, our sacred sefarim teach us an important principle. Whenever we are presented with both a simple explanation—“pshat”—and an exposition—“drush”—the two explanations are intimately related. This obliges us to find a relationship between these two explanations. The straightforward explanation is that the passuk is chronicling the incredible miracle of the two mountains converging to save Yisrael. The exposition asserts that the passuk refers to the battle in the Beis Midrash between those studying Torah that continues until they arrive at a peaceful, loving resolution.
The matter can be resolved beautifully based on the words of Chazal in the Midrash Shochar Tov cited above: HKB”H said to David, “Study Torah and I will fight your battle.” Similarly, Moshe said: “About this it will be said in the sefer of the wars of Hashem”—if you studied the Torah that is written in the sefer, I will battle on your behalf. Clearly, when the passuk states: "על כן יאמר בספר מלחמות ה'"—about this it will be said in the sefer of the wars of Hashem—it is referring to the battles in the study halls related to Torah. If Jews wage this battle, HKB”H promises them, “I will battle your enemies for you!” This explains the conclusion of the passuk very nicely: "את והב בסופה"—even a father and his son, or a Rav and his pupil, engaged in the battle of Torah, they continue until the matter is resolved with love and respect.