But Balaam replied to the servants of Balak, “Although Balak were to give me his house full of silver and gold, I could not go beyond the command of the LORD my God, to do less or more. You remain here, as the others did, so that I may learn what more the LORD may say to me.” That night God came to Balaam and said to him, “If the men have come to summon you, get up and go with them; but do only what I tell you to do.” So Balaam got up in the morning, saddled his donkey, and went with the officials of Moab.
God’s anger was kindled because he was going, and the angel of the LORD took his stand in the road as his adversary. Now he was riding on the donkey, and his two servants were with him. The donkey saw the angel of the LORD standing in the road, with a drawn sword in his hand; so the donkey turned off the road, and went into the field; and Balaam struck the donkey, to turn it back onto the road. Then the angel of the LORD stood in a narrow path between the vineyards, with a wall on either side. When the donkey saw the angel of the LORD, it scraped against the wall, and scraped Balaam’s foot against the wall; so he struck it again. (Numbers 22:18-25)
Just because God lets you do it, it doesn’t mean you should. God had told Balaam not to do what Balak, king of the Moabites, had asked. But like a child who continues pleading with his parent long after the parent has said no, so Balaam, because money was being dangled before him, kept begging God. Balaam knew what God wanted but chose his own way instead.
Angry that Balaam insisted on going, God sent an angel to block his path. The donkey Balaam was riding saw the angel and tried to avoid him. Balaam reacted by beating his donkey. But despite whatever pain Balaam gave him, the donkey refused to go anywhere he wasn’t supposed to.
In contrast, despite everything that God told him, Balaam was going to go his own way, regardless. He pronounced a blessing rather than a curse upon Israel, but he figured out a way—or so he thought—to get around God’s constraint. He told Balak to send women to seduce the Israelites and lead them into idolatry. Balaam might not be able to curse the Israelites, but he thought he could get God to curse them anyhow. That way, Balak would still pay him. But it didn’t work out quite as either he or Balak hoped. Instead, it cost both of them their lives (see Joshua 13:22).