Although Balak wanted Balaam to curse Israel, Balaam repeatedly blessed Israel instead.
We previously established that Balak, king of Moab, hired Balaam to curse Israel. GOD eventually allowed Balaam to visit Balak but only permitted Balaam to speak the words GOD gave him.
Balaam warned Balak that he would only speak what GOD told him to say.
36 Now when Balak heard Balaam was coming, he went out to meet him at the city of Moab, which is on the borders of the Arnon, the boundaries of his territory. 37 Then Balak said to Balaam, “Did I not earnestly send to summon you? Why did you not come to me? Am I not actually able to honor you?” 38 Balaam then said to Balak, “Look, I did come to you. Shall I now be able to say anything? Whatever word God may put in my mouth, this I must speak.”
(Numbers 22:36-38 OSB)
The two made preparations to see what message GOD would reveal to Balaam:
22:39 So Balaam went with Balak, and they came to unwalled encampments. 40 Then Balak sacrificed sheep and young bulls, and he sent some to Balaam and to the rulers with him.
41 When morning came, Balak took Balaam and brought him up to the pillar of Baal; and he showed him part of the people from there.
23:1 Now Balaam said to Balak, “Build seven altars for me here, and prepare for me here seven young bulls and seven rams.” 2 So Balak did just as Balaam had spoken, and he offered a young bull and a ram on each altar. 3 Then Balaam said to Balak, “Stand alongside your sacrifice, and I will go; perhaps God will reveal Himself to me in a meeting, and I will tell you whatever word He shows me.” So Balak stood alongside his sacrifice, and Balaam went on a direct road to inquire of God. 4 Thus God revealed Himself to Balaam, and Balaam said to Him, “I prepared seven altars, and offered on each altar a young bull and a ram.” 5 Then God put a word in Balaam’s mouth, and said, “Return to Balak, and thus you shall speak.” 6 So he returned to him, and there he was, standing alongside his burnt offerings, he and all the rulers of Moab with him. 7 Then the Spirit of God came upon him, and he took up his parable and said:
“Balak the king of Moab summoned me from Mesopotamia,
From the mountains of the east, saying,
Come, curse Jacob for me, and come,
Call down a curse upon Israel.
8 How shall I curse whom the Lord did not curse?
Or how shall I call down a curse upon whom God did not curse?
9 For from the top of the mountains I see him,
And from the hills I envision him.
Behold, the people shall dwell alone,
And they shall not be reckoned among the nations.
10 Who can examine accurately the seed of Jacob,
And number the tribes of Israel?
May my soul die with the souls of the righteous,
And may my seed be as their seed.”
(Numbers 22:39-23:10 OSB)
Instead of cursing Israel as Balak expected, Balaam blessed Israel as he was inspired by the Holy Spirit to speak. In so doing, Balaam prophesied about Israel's future and even his own death, which would come soon. Balak was incensed:
11 But Balak said to Balaam, “What have you done to me? I summoned you to curse my enemies, and look, you have blessed them bountifully.” 12 Then Balaam said to Balak, “Should I not be careful to speak whatever God may put into my mouth?”
(Numbers 23:11-12 OSB)
Apparently concluding this to be an accident, a "false transmission" from GOD, or simply having not yet sacrificed enough animals to persuade GOD, Balak suggested they relocate and try a second time.
13 So Balak said to him, “Yet come with me to another place, from which vantage points you may not see him. You will see only a part, but not all, of him; then curse him for me from there.” 14 Then he took him along to a lookout point over the land, upon the summit of a hewn rock, and built seven altars there; and he offered a young bull and a ram on each altar. 15 Balaam then said to Balak, “Stand alongside your sacrifice, while I go and enquire of God.” 16 Then God met Balaam and put a word in his mouth, and said, “Return to Balak, and thus you shall speak.” 17 So he returned to him, and there he was, standing alongside his whole burnt offering, and all the rulers of Moab were with him. Balak then said to him, “What did the Lord say?” 18 Then he took up his parable and said:
“Rise up, Balak, and hear.
Give ear as a witness, son of Zippor.
19 God is not like a man, to be deceived,
Nor like a son of man, to be threatened.
Would He, having spoken, not act?
Or shall He speak, and not stand by it?
20 Behold, I receive to bless,
And I shall bless, and not reverse it.
21 There shall be no trouble in Jacob,
Nor shall distress be seen in Israel,
For the Lord his God is with him,
And the glorious acts of rulers are in him.
22 God brings them out of Egypt,
Like the glory of the unicorn for him.
23 For there is no portent in Jacob,
Nor any divination in Israel.
In due time it will be told to Jacob
And Israel what God will accomplish.
24 Behold, a people like a lion’s cub will rise up
And will exult like a lion.
It shall not lie down until it eats the prey
And drinks the blood of the slain.”
(Numbers 23:13-24 OSB)
Balam was displeased, yet decided to try once more:
25 Then Balak said to Balaam, “Neither curse him with curses for me, nor actually bless him.” 26 So Balaam answered and said to Balak, “Did I not tell you, saying, ‘The word God may speak, that I shall do’?”
27 Then Balak said to Balaam, “Come, I will take you along to another place, if it will please God to curse him for me from there.” 28 So Balak took Balaam along to the top of Peor, which extends into the desert. 29 Then Balaam said to Balak, “Build seven altars for me here, and prepare for me here seven young bulls and seven rams.” 30 So Balak did as Balaam told him, and he offered a bull and a ram on each altar.
(Numbers 23:25-30 OSB)
For the third and final time, Balaam blessed Israel as GOD told him:
1 Now when Balaam saw it was good before the Lord to bless Israel, he did not go as he was accustomed to do, to seek and find omens; but he turned and set his face toward the desert. 2 Then Balaam raised his eyes and saw Israel encamped according to their tribes; and the Spirit of God came upon him. 3 Then he took up his parable and said:
“Balaam the son of Beor declares;
The man who truly sees declares;
4 The one who hears the sayings of God declares;
The one who saw the vision of God in a dream,
A revelation seen by him:
5 How beautiful are your dwellings, O Jacob,
Your tents, O Israel.
6 Like wooded valleys offering shade,
And like gardens by the rivers,
Like tents the Lord pitched,
Like cedars beside the waters.
7 A Man shall come forth from his seed,
And He shall rule many nations;
And His kingdom shall be more exalted than Gog,
And His kingdom shall increase.
8 God led Him out of Egypt,
And He has the glorious appearance of a unicorn.
He shall consume the nations of his enemies
And deprive them of their strength.
He shall shoot the enemy with His missiles.
9 He lies down and rests like a lion,
And like a lion’s cub, who shall rouse Him?
Those who bless You are blessed,
And those who curse You are cursed.”
10 Then Balak was angry with Balaam, and he struck his hands together; and Balak said to Balaam, “I summoned you to curse my enemy, and look, you actually blessed him for a third time. 11 Now therefore, flee to your place. I said I would honor you, but in fact, the Lord deprived you of glory.” 12 So Balaam said to Balak, “Did I not also tell your messengers whom you sent to me, saying, 13 ‘If Balak were to give me his house full of silver and gold, I could not go beyond the Lord’s word, to do good or evil of my own will. Whatever the Lord may say, this I shall speak’? 14 So now, indeed, I am going to my place. Come, I will counsel you as to what this people will do to your people in the latter days.”
15 So he took up his parable and said:
“Balaam the son of Beor declares;
The man who truly sees declares;
16 The one who hears the sayings of God declares;
And the one who knows the knowledge of the Most High,
And who saw the vision of God in a dream, a revelation seen by him:
17 I will show Him, but not now;
I bless Him, but He is not near.
A Star shall rise out of Jacob;
And a Man shall rise out of Israel.
He shall break in pieces the rulers of Moab
And plunder all the sons of Seth.
18 Edom shall be His inheritance,
And also His enemy shall be His inheritance;
But Israel acts with strength. 19 He shall rise up out of Jacob,
And destroy the survivors of the city.”
20 Then seeing Amalek, he took up his parable and said:
“Amalek was first of the nations,
But their seed shall perish.”
21 Then seeing the Kenites, he took up his parable and said:
“Your dwelling is strong;
And if you should put your nest in a rock,
22 And become dwellings of craftiness for Beor,
Nevertheless the Assyrians shall take you captive.”
23 Then seeing Og, he took up his parable and said:
“Oh! Oh! Who shall live whenever God may bring these things to pass? 24 Now these things shall come to pass from the hand of the Kittians, And they shall also maltreat Asshur and the Hebrews, But they themselves with one accord shall perish.”
25 So Balaam rose and departed and returned to his place; Balak also went to his own place.
(Numbers 24:1-25 OSB)
Balak's experiment had utterly failed. Whatever outcome Balak had hoped to achieve through the prophet and medium's curses, that would not happen.
While the immediate application of Balaam's blessing Israel was the message to Balak that Israel would not be defeated in executing GOD's mission to kill all enemies and cleanse the land of Canaan, it is important to note that much of Balaam's prophecy dealt with what was then Israel's future, the time of the Messiah and the end of GOD's original covenant with Israel established at Sinai.