Numbers 22:32 in the King James Version
And the angel of the LORD said unto him, Wherefore hast thou smitten thine ass these three times? behold, I went out to withstand thee, because thy way is perverse before me:
Context
31 Then the LORD opened the eyes of Balaam, and he saw the LORD’s angel standing in the way, with his sword drawn in his hand; and he bowed his head, and fell on his face.
32 The LORD’s angel said to him, “Why have you struck your donkey these three times? Behold, I have come out as an adversary, because your way is perverse before me.
33 The donkey saw me, and turned away before me these three times. Unless she had turned away from me, surely now I would have killed you, and saved her alive.”