When the donkey saw the Messenger of the Lord standing in the road with his sword drawn, the donkey turned off the road into a field. Balaam hit the donkey to get it back on the road.