Numbers 22:25
And when the ass saw the angel of the LORD, she thrust herself unto the wall, and crushed Balaam’s foot against the wall: and he smote her again. And when the ass saw the angel of the LORD, she thrust herself unto the wall, and crushed Balaam’s foot against the wall: and he smote her again.
God's anger was kindled because Balaam rose and went to overtake Balak's messengers when they had not called him in the morning, after he had been suffered to follow his own covetous inclination in trying to please both God and men. The angel was sent to stand in the way to slay him for his presumptuous folly, because his way was perverse before God and resistant to God's will. The ass saw the angel of the Lord when Balaam did not, for Balaam was double-minded and blinded by passion for favor and honor and rewards.
To turn aside and avoid the angel she thrust herself unto the wall and pressed against it, crushing Balaam's foot against the wall. Balaam, beside himself with rage at the delay, smote her again, so blinded by passion that even her speaking struck him as nothing remarkable. Her turning aside to avoid the angel helped preserve his life, though she recoiled and suffered injury under his cruel driving. When the angel revealed himself Balaam was terrified, left his beast, and bowed in humility.
The angel charged him that his way was perverse before him, warned him against gratifying the Moabites, and then gave him permission to pursue his journey. This was so God would glorify His name before the enemies of Israel by showing that a man of covetous disposition dared not curse Israel for any promises of promotion or rewards, which mattered because Israel must overcome the Moabites in order to overcome the inhabitants of Canaan. Balaam was on his way to curse Israel, working contrary to God from selfishness and covetousness, and the meeting with the angel shows God intervening to stop that purpose.
The angel witnessed Balaam's cruelty and stood ready to oppose and destroy him for resisting God's will and for mistreating the animal, which could not speak to protest. The account shows that God sees cruelty to animals, condemns and holds men accountable for abuse, and may use an animal as His agent. Balak's conducting Balaam from one point to another in the vain hope that the blessing of Israel might be changed into a curse failed, as the repeated attempts at Worms to move a steadfast reformer from his firmness failed, showing that human applause and the fear of man are alike powerless against firmness sustained by divine power.