Numbers 22:28-31

28 Then the LORD opened the donkey’s mouth, and it said to Balaam, “What have I done to you to make you beat me these three times?”
29 Balaam answered the donkey, “You have made a fool of me! If only I had a sword in my hand, I would kill you right now.”
30 The donkey said to Balaam, “Am I not your own donkey, which you have always ridden, to this day? Have I been in the habit of doing this to you?” “No,” he said.
31 Then the LORD opened Balaam’s eyes, and he saw the angel of the LORD standing in the road with his sword drawn. So he bowed low and fell facedown.