In the Book of Numbers, Balaam, a prophet hired by a king to curse the Israelites, rides his donkey on a trip that angers God. An angel with a drawn sword blocks the road.
The donkey sees it and turns aside three times. Balaam sees nothing, so he beats her each time.
Then, the story says, the donkey speaks and asks why. Only after that does Balaam see the angel.