Principle
Moab ruler, King Balak, hired a soothsayer named Balaam to curse Israel.
Explanation
Having been made aware of Israel's victories over the Amorites, the Moabites were terrified about what was about to happen to them. Moabite king, Balak, devised a plan whereby he hired a diviner named Balaam to place a curse upon Israel, for Moab's protection.
1 Now the children of Israel broke camp and camped west of Moab, by the Jordan across from Jericho. 2 So when Balak the son of Zippor saw all that Israel did to the Amorites, 3 and Moab was exceedingly afraid of the people, because they were many, and Moab was irritated because of the children of Israel, 4 then Moab said to the elders of Midian, “Now this congregation will lick up everything around us, as a young bull licks up the grass of the field.” Now Balak the son of Zippor was king of the Moabites at that time. 5 Then he sent ambassadors to Balaam the son of Beor at Pethor, which is near the river in the land of the sons of his people, to call him, saying, “Look, a people came from Egypt. See, they cover the face of the earth and are settling next to me. 6 Therefore, come at once, and curse this people for me, for they are stronger than we. If we would be able to strike some of them, then I could drive them out of the land, for I know he whom you bless is blessed, and he whom you curse is cursed.”
7 So the elders of Moab and the elders of Midian departed with their divinations in their hand; and they came to Balaam and spoke to him the words of Balak. 8 Then he said to them, “Lodge here tonight, and I will bring back to you whatever words the Lord may speak to me.” So the princes of Moab stayed with Balaam.
(Numbers 22:1-8 OSB)
Despite practicing divination (see Joshua 13:22), which GOD hates, Balaam did actually speak with Jehovah GOD. Only, it didn't go well for the visiting Moabites.
9 God then came to Balaam and said to him, “Who are these men with you?” 10 So Balaam said to God, “Balak the son of Zippor, king of Moab, sent to me, saying, 11 ‘Look, a people came out of Egypt, and they cover the face of the earth and are settling next to me. Therefore, come at once, and curse them for me; perhaps I shall be able to strike them and drive them from the land.’” 12 Then God said to Balaam, “You shall not go with them; neither shall you curse the people, for they are blessed.” 13 So Balaam rose in the morning and said to the rulers of Balak, “Return to your lord, for God is not allowing me to go with you.” 14 Therefore, the rulers of Moab rose and went to Balak and said, “Balaam is unwilling to come with us.”
(Numbers 22:9-14 OSB)
So, the morning after speaking with GOD this first time, Balaam basically said, "Sorry! Can't do it. The people you're concerned about are off limits for cursing. God said so." And these rulers went home to Balak.
15 Balak yet again sent rulers, more numerous and more honorable than these. 16 When they came to Balaam, they said to him, “Thus says Balak the son of Zippor, ‘I beg of you not to hesitate in coming to me; 17 for I will certainly honor you greatly, and I will do whatever you say. Therefore come and curse this people for me.’” 18 Then Balaam answered and said to the rulers of Balak, “Though Balak were to give me his house full of silver and gold, I could not go beyond the word of the Lord God, to make it little or great in my mind. 19 Now therefore, stay here tonight, so I may know what more the Lord will say to me.”
20 Thus God came to Balaam at night and said to him, “If these men are present to summon you, rise and follow them; but the word I speak to you—that you shall do.” 21 So Balaam rose in the morning, saddled his donkey, and went with the rulers of Moab.
(Numbers 22:15-21 OSB)
Despite GOD's clear instructions the first time, Balaam apparently really liked this honoring and riches idea, so he figured it was worth asking GOD a second time ... you know ... for *clarification* ... and such.
To Balaam's joy, GOD told Balaam to return with the men but to only say what GOD revealed to him.
But this would not end well for Balak or Balaam.