Israelites encamped at Moab across the Jordan from Jericho (22:1). Balak, king of Moab, was fearful of the Israelites. He hired Balaam, a corrupt man, to curse the Israelites. These events took place 14 centuries before Jesus’ birth.
Note: Balaam announced in four oracles or messages that God would bless Israel (Num. 23-24). These verses are part of Balaam’s third oracle or message, spoken from the top of Mount Peor, the center in Moab for the worship of the god Baal (23:28).
24:1 Now when Balaam [a prophet for hire; a non-Hebrew who knew about the Lord] saw that it pleased the LORD to bless Israel, he did not resort to sorcery [divinations] as at other times [his customary practice], but turned his face toward the desert.
24:2 When Balaam looked out and saw Israel encamped tribe by tribe, the Spirit of God came upon him [we do not know the precise nature of this experience; the Spirit of God forced Balaam to deliver true prophecies of the coming King]
24:3 and he uttered [unwittingly] his oracle: “The oracle of Balaam son of Beor, the oracle of one whose eye sees clearly [God had opened his eyes to understand and communicate His message],
24:4 the oracle of one who hears the words of God, who sees a vision [spiritual and future realities revealed to him by God’s Spirit] from the Almighty, who falls prostrate, and whose eyes are opened:
24:5 [positive picture of Israel as beautiful and prosperous] “How beautiful are your tents, O Jacob, your dwelling places, O Israel!
24:6 [picture of fertility and abundance] “Like valleys they spread out, like gardens beside a river, like aloes planted by the LORD, like cedars beside the waters.
24:7 Water will flow from their buckets; their seed will have abundant water [ultimately fulfilled in Christ through whom rivers of living water flow out in blessing]. “[Notice two things about the king and his kingdom]  Their king will be greater than Agag;  their kingdom will be exalted [veiled reference to coming Messiah].
24:8 “God brought them out of Egypt; they have the strength of a wild ox. They devour hostile nations and break their bones in pieces; with their arrows they pierce them.
24:9 [cf. Gen. 49:9 re: the words spoken by Jacob over 450 years earlier] Like a lion [pictures Israel as secure and powerful in the promised land] they crouch and lie down, like a lioness — who dares to rouse them? [cf. Gen. 12:3 re: God’s words to Abraham] “May those who bless you be blessed [to endue with power for success, prosperity, fruitfulness, longevity (Dean)] and those who curse you be cursed [to bind with a spell, hem in with obstacles, render powerless to resist (Dean)]!”
Balaam’s fourth oracle is recorded in Numbers 24:15-19. God’s plan for the Messiah was revealed to and recognized by even the enemies of Israel.
24:17 “I [Messianic prophecy through a non-Israelite] see [spiritual seeing] him [the coming Messiah-King], but not now [words point to the future]; I behold him, but not near [words point to the future]. A star [denoted a royal figure; symbol of glory] will come out of Jacob; a scepter [denoted a royal figure; symbol of power and authority; cf. Gen. 49:10] will rise out of Israel. [note four historical references]  He will crush the foreheads of Moab,  the skulls of all the sons of Sheth [possibly early inhabitants of Moab].
24:18  Edom [descendants of Esau] will be conquered;  Seir [chief mountain range in Edom; home to Esau and his descendants], his [refers to the one designated “star” and “scepter” in v. 17] enemy, will be conquered, but Israel will grow strong [experience victory over enemies through a coming ruler].
Note: Prophecy fulfilled initially in David who achieved victories over both Moab and Edom (cf. 2 Sam. 8:2,13-14; 1 Kings 11:15-16). Ultimately, this prophecy fulfilled by Messiah (cf. Ps. 2; Ps. 110; Rev. 22:16). In an eschatological context, the words Edom and Seir stand for any enemies of God’s people and God’s Messiah.
24:19 A ruler [a coming Ruler, a prophecy ultimately fulfilled in Christ] will come out of Jacob [i.e., Israel] and destroy the survivors of the city [possibly refers to city in Moab named Ar (cf. Num. 21:28)].”