A CONDENSED VERSION:
Balam was a prophet of God. THe enemies of Israel wanted him to curse God's chosen people. Even after receiving a definite know for the Lord he still cowed down to the wishes of a Moabite king and besought God to curse the children of His Promise. While God did allow Balaam to acompany this king He instructed him each time not to curse the people of God. There seemed to be a problem with Balaam's heart as God had to speak to him thru a donkey to get a change of attitude.When all was said and done He spoke a blessing on Israel:
Num 24:1 And when Balaam saw that it pleased the LORD to bless Israel, he went not, as at other times, to seek for enchantments, but he set his face toward the wilderness.
Num 24:2 And Balaam lifted up his eyes, and he saw Israel abiding in his tents according to their tribes; and the spirit of God came upon him.
Num 24:3 And he took up his parable, and said, Balaam the son of Beor hath said, and the man whose eyes are open hath said:
Num 24:4 He hath said, which heard the words of God, which saw the vision of the Almighty, falling into a trance, but having his eyes open:
Num 24:5 How goodly are thy tents, O Jacob, and thy tabernacles, O Israel!
Num 24:6 As the valleys are they spread forth, as gardens by the river's side, as the trees of lign aloes which the LORD hath planted, and as cedar trees beside the waters.
Num 24:7 He shall pour the water out of his buckets, and his seed shall be in many waters, and his king shall be higher than Agag, and his kingdom shall be exalted.
Num 24:8 God brought him forth out of Egypt; he hath as it were the strength of an unicorn: he shall eat up the nations his enemies, and shall break their bones, and pierce them through with his arrows.
Num 24:9 He couched, he lay down as a lion, and as a great lion: who shall stir him up? Blessed is he that blesseth thee, and cursed is he that curseth thee.
It should be noted that this Balaam was killed later by the very people he sought 3 times to curse.