Balak, the King of Moab, summons the prophet Bilam to obtain a curse directed at the People of Israel. On his journey, Bilam is injured by his donkey, which is sent by Hashem to impede their progress. On three occasions, from three distinct locations, Bilam endeavors to utter his curses. However, on each occasion, he instead pronounces blessings. Additionally, Bilam offers prophecies regarding the end of days and the advent of Mashiach.
Following two decisive victories against the Canaanites in the Negev and the Amorites in Transjordan, the imminent military prowess of Israel prompted a state of alarm among the leaders of Moab. The Moabite territory constituted the sole obstacle to Israel's possession of the Jordan River and the land of Canaan. Balak ben Zippor, the king of Moab, is aware that he is the next target. In a desperate attempt to avert the impending threat, he turns to an unconventional preventive measure. He summons Bilam, son of Beor, a sorcerer from Mesopotamia, to curse Israel, thereby rendering it susceptible to defeat on the battlefield. Despite Bilam's arrival, however, HaShem thwarts the plan. Within the monotheistic framework of the Torah, Bilam is only able to utter what HaShem imparts to him. Consequently, he concludes with exalted praise of Israel, much to Balak's dismay.