So this old-testament dude named Balaam practiced prophesy, divination, and magic. You can imagine how God felt about those last two things. (Not good.) When Israel’s enemy asked Balaam to come over and curse Israel, God told Balaam not to go. Balaam went anyway. To be fair, they were offering him A LOT of money. He rode along on a donkey until the Angel of the Lord (which could be the incarnate form of Jesus before He came to earth) stood in his way. Balaam couldn’t see the angel with a drawn sword, but Balaam’s donkey could. Balaam’s ass protested the treatment it was given. Let’s go to the passage for the rest of the story:
Then the Lord opened Balaam’s eyes and he saw the Angel of the Lord standing in the way with His drawn sword in His hand; and Balaam bowed his head and fell flat on his face. And the Angel of the Lord said to him, ‘Why have you struck your donkey these three times? Behold, I have come out to stand against you, because your way is perverse before Me. The donkey saw Me and turned aside from Me these three times. If she had not turned aside from Me, surely I would also have killed you by now and let her live.’
Egg on Balamm’s face, right? After this encounter he shaped up, blessed Israel, and became a decent prophet. Hey, we all have our learning curve.