The Israelites traveled on and camped in the plains of Moab near the Jordan across from Jericho.
References for Numbers 22:1
Now Balak son of Zippor saw all that Israel had done to the Amorites.
References for Numbers 22:2
Moab was terrified of the people because they were numerous, and dreaded the Israelites.
So the Moabites said to the elders of Midian, "This horde will devour everything around us like an ox eats up the green plants in the field." Since Balak son of Zippor was Moab's king at that time,
he sent messengers to Balaam son of Beor at Pethor, which is by the Euphrates in the land of his people. Balak said to him: "Look, a people has come out of Egypt; they cover the surface of the land and are living right across from me.
References for Numbers 22:5
Please come and put a curse on these people for me because they are more powerful than I am. I may be able to defeat them and drive them out of the land, for I know that those you bless are blessed and those you curse are cursed."
The elders of Moab and Midian departed with fees for divination in hand. They came to Balaam and reported Balak's words to him.
References for Numbers 22:7
He said to them, "Spend the night here, and I will give you the answer the Lord tells me." So the officials of Moab stayed with Balaam.
Then God came to Balaam and asked, "Who are these men with you?"
Balaam replied to God, "Balak son of Zippor, king of Moab, sent [this message] to me:
'Look, a people has come out of Egypt, and they cover the surface of the land. Now come and put a curse on them for me. I may be able to fight against them and drive them away.' "
Then God said to Balaam, "You are not to go with them. You are not to curse this people, for they are blessed."
So Balaam got up the next morning and said to Balak's officials, "Go back to your land, because the Lord has refused to let me go with you."
The officials of Moab arose, returned to Balak, and reported, "Balaam refused to come with us."
Balak sent officials again who were more numerous and higher in rank than the others.
They came to Balaam and said to him, "This is what Balak son of Zippor says: 'Let nothing keep you from coming to me,
for I will greatly honor you and do whatever you ask me. So please come and put a curse on these people for me!' "
But Balaam responded to the servants of Balak, "If Balak were to give me his house full of silver and gold, I could not go against the command of the Lord my God to do [anything] small or great.
Please stay here overnight as the others did, so that I may find out what else the Lord has to tell me."
God came to Balaam at night and said to him, "Since these men have come to summon you, get up and go with them, but you must only do what I tell you."
When he got up in the morning, Balaam saddled his donkey and went with the officials of Moab.