The story of Bilaam opens with the truce struck between two erstwhile warring nations, Moav and Midyan.
Moav had lost the strip of land between the Arnon river in the south and the Yabbok river in the north in a battle with Sichon, the king of the Amorites. Following the victory of Sichon over Moav, that strip of land no longer belonged Moav but rather to the Amorites (Bamidbar 21:26-27). Subsequently, the people of Israel captured that strip of land from Sichon (Bamidbar 21:24-28 and Shoftim 1:13-23). The people of Moav, who were aware that G-d had forbidden the Jews to attack the land of Moav – “Al Tatzar es Moav” (Devarim 2:9) – now worried that since that strip of land had belonged to the Amorites before it was conquered by the Jews and was redesignated the land of the Amorites rather than the land of Moav, the prohibition not to attack it no longer applied. The people of Maov also knew that the Jews were destined to eventually capture that land from the Amorites, who were one of the seven Canaanite nations whose lands G-d had promised to give to Avraham (Bereishis 15:21).
Midyan was a neighbor of Moav and was also concerned that the Jews would invade. The surest way for both Moav and Midyan to protect themselves from an Israeli attack was to bury the hatchet between them and form an alliance against Israel. As part of this alliance, both countries appointed Balak as their leader (Bamidbar 22:5).
Balak realized that the land of the Amorites, including the strip of land between the Arnon River and the Yabbok river which formerly belonged to Moav, was eventually destined to be taken over by the Jews in accordance with G-d’s promise to Avraham. There was nothing he could do to prevent that from happening.
However, Balak decided to play for time. After all, he reasoned, the Jews were meant to conquer the lands of the seven nations, including the land of the Amorites already forty years ago. But G-d had stalled the Jewish take-over of these lands because the Jews had sinned. Balak also understood that if the Jews were able to defeat the mighty armies of Sichon and Og, who were the pthe protectors of Moav and Midyan (Bamidbar, chapter 21), Balak and his army had zero chance of defeating the Jews on the battlefield.
But if there were a way to remind G-d of the sins of the Jews and, better still, to cause the Jews to sin again, perhaps G-d would stall the Jewish conquest of the Amorite lands for yet another forty years and Balak could kick the can down the road to the next generation.
So Balak turned to the magician Bilaam who was renowned for the power of his curses. Any curse he would utter would come true. After all, he had cursed the people of Moav that they should lose the war with Sichon and they did.
Bilaam however, was told by G-d that the mission given to him by Balak was futile. The Jews cannot be cursed. They are already blessed (Bamidbar 22:12). But this did not deter Bilaam. Even though he knew he was going to eventually strike out, if he could be in the game for a while, get paid and be the boss, that was good enough for him.
So when his donkey, who had never disobeyed him, refused three times to go in the direction Bilaam drove him, Bilaam the magician, who was into omens, should have taken this as a clear sign that something was wrong. He should have aborted his plan. Yet he ignored these signs. He persisted. He wanted to be a queen for the day, even though he knew he would ultimately fail. Even the angel of death, who appeared before him with his sword drawn, warning him that if he persisted he would meet his death by sword (31:8), was unable to deter him. Such was the desire of Bilaam to capitalize on the vulnerability of Balak and such was his hatred for Israel that he was determined to push on whatever the consequences.
So Bilaam began to explore the land with a metal detector for sins.
In his first attempt at exposing the sins of the Jews that might prompt G-d to delay their entry into the land for another forty years, he took Balak to where the Jews would serve the idol of Ba’al thirty years in future in the days of Joshua.
Bilaam thought that the only reason G-d had delivered the Israelites from the hands of the Egyptians was because they would be deserving of it in the future, not because they were deserving of it in the present. As we read in the Shiras Hayam, “Vehamayim lahem choma” – the Torah, which is compared to water, and which the Jews would receive and be loyal to in the future, was their protection, their wall, against the present threat of the Egyptians. But now Bilaam showed G-d that relying on the future was a mistake, because in the future, long after they would receive the Torah, the Jews would serve idols on this very spot on which Bilaam and Balak now stood (22:41).
But this ploy did not work. G-d does not punish one now for sins that would be committed in the future. That is why G-d saved Yishmael “ba’asher hu sham” (Bereishis 21:17). At the time when the child Yishmael was in mortal danger of dying from thirst in the desert, G-d did not judge him based on who he would become, but based on who he was at that moment. So, the future sins of the Jews gave G-d no reason to delay their victory over the Amorites and the conquest of their lands.
So Bilaam tried again. This time he took Balak to the top of a cliff overlooking Moshe’s burial place opposite Ba’al Pe’or. You see, he argued to G-d, the Jews have already sinned here in the past, just a short while ago (Bamidbar 20:3-13). They complained to Moshe about the lack of water. They are the ones who provoked Moshe to hit the rock, and they are the ones who are responsible for his death. They have prevented him from entering the land of Israel. And besides, once Moshe dies, they will again be disloyal to the Torah.
But this ploy failed too. Moshe’s sin was not to be blamed on the Jews, even if they egged him on. After all, divrei harav vedivrei hatalmid divrie mi shom’im? It was Moshe’s sin, not the Jew’s sin that caused his demise and they were not responsible for it.
So Bilaam tried a third time. He took Balak to the top of the mountain on which, in just six months’ time, the Jews would prostrate themselves to the idols of Peor. They would serve Peor not because they believed in him, but simply to be able to have unimpeded relations with the daughters of the Moav (Sanhedrin 64a). You see, said Bilaam, the real reason the Jews want to serve idols is because it condones their desire to have illicit relations, unashamedly, and in public with whomever they fancy. Not only is this licentious conduct not condemned by the religion of Peor, it is condoned by it as part of the religion of idolatry. And G-d, if You think that this too has not happened yet and so you cannot punish them for sins of the future, look toward the desert (24:1) and see for yourself the place where Jews served the golden calf. They served the golden calf for the same reason. So sinning in this way is in their DNA. It’s not a sin in the future.
But that did not work either. True, in only six months’ time, the Jews would fall prey to the enticement of the daughters of Moav (chapter 25). But right now, if you would stop a Jew in the street and ask him whether he wants to have relations with one of the Moabite women, he would tell you he is happily married and would ask you to leave him alone. It was only later, when the older women of Moav, who sold the Jews wares at the town bazaars, enticed them into their tents and told them that there were better goods inside, in the form of beautiful Moabite women and added wine into the bargain, that the Jews fell for it. But that the Jews would sin in that way was not a foregone conclusion. It could not be predicted even one moment before it happened and certainly not six months before.
Right now, the Jews were far removed from that. They even constructed their houses so that their windows would not face each other. They deliberately averted their eyes from temptation. They were not deserving of punishment at this time.
Bilaam was wily. He realized that the words “Mah tovu ohalechah, Yaakov” (24:5) can be read two ways. They can be read as an expression of appreciation, how good are your tents of learning. They keep the Jew away from sin. Or, alternatively as: what use are these tents of learning? Why waste the good life sitting and learning when you could go out and have a good time? Bilaam knew that the Torah can be a sam chayim, a potion for life, or a sam maves, a potion for death. It depends on which way you look at it. And he hoped that he could implant in the Jew the evil inclination to ask the question, Ma tovu, rather than express appreciation for the essence of life found in the tents of learning.