Numbers 22:1-8

1 Then the Israelites moved and set up camp across from Jericho, on the plains of Moab east of the Jordan River.
2 Balak, son of Zippor, saw all that Israel had done to the Amorites.
3 The Moabites were very afraid because there were so many Israelites. Besides, the Moabites couldn't stand these people.
4 So the Moabites said to the leaders of Midian, "All those people will eventually eat up everything around us the same way an ox eats up the grass in a field." At that time Balak, son of Zippor, was king of Moab.
5 He sent messengers to summon Balaam, son of Beor, who was at Pethor, on the Euphrates River, in the land where his people lived. Balak's message was, "A nation has just come here from Egypt. They've spread out all over the countryside and are setting up their camp here in front of me.
6 Please come and curse these people for me, because they are too strong for me. Maybe then I'll be able to defeat them and force them out of the country. I know that whomever you bless is blessed and whomever you curse is cursed."
7 The leaders of Moab and Midian left, taking money with them to pay for Balaam's services. They came to Balaam and told him what Balak had said.
8 "Spend the night here," Balaam said to them, "and I'll report to you what the LORD tells me." So the princes of Moab stayed with Balaam.