Bilaam was the prophet for the Nations who watch the progression of the Israelites into, their destiny with apprehension. He is called into action by Balak the King of Moab who has been witness to the fact that the armies of the Canaanite nations are no match for this ragtag group of people led by an eighty year old man and directed by a Divine pillar of fire and smoke. At first the king threatens, entices and commands Bilaam to come do what G-d clearly does not want Bilaam to do. Bilaam desperately wants to go, but cannot go against the express will of the Creator.
G-d makes it very clear to Balak in a night vision:
“And God said unto Bilaam: ‘Thou shalt not go with them; thou shalt not curse the people; for they are blessed.'(Numbers 22:12). Yet G-d seems to eventually give him the much desired permission, “And God came unto Bilaam at night, and said unto him: ‘If the men are come to call thee, rise up, go with them; but only the word which I speak untot thee, that shalt thou do.’ (Numbers 22:20)