But God was angry with Balaam for agreeing to curse His people. So God sent and angel with a sword to stand in front of Balaam in the road. Balaam couldn’t see the angel, but his donkey did and ran into the field by the side of the road to get away. Balaam beat the donkey and told her to behave. The angel went on further and stood in the road at a place where there was a wall on each side. When the donkey came to the place, she pressed up very close to the wall to get by the angel; but in doing this she crushed Balaam’s foot against the wall, and he hit her again. Then the angel went on still further and stood in a narrow place where there was no room at all to get by. The donkey saw the angel standing there with the sword and was so afraid that she fell down under Balaam. This made Balaam very angry, and he beat her as hard as he could. Then the Lord made the donkey speak like a person! She said, “What have I done to deserve your hitting me these three times?
Balaam said it was because she had disobeyed him and had turned off the road when he wanted her to go straight ahead. “If I had a sword with me I’d of killed you.” Balaam said. Then the donkey spoke to him again and said, “Haven’t you ridden on me ever since I was yours until today? And have I ever done anything like this before?” “No,” Balaam said, “you haven’t.”
Then the Lord opened Balaam’s eyes, and he saw the angel standing there in front of him with a sword, ready to kill him. Balaam was very frightened and threw himself flat on the ground before the angel. Then the angel said to him, “Why have you struck your donkey these three times? I came here to stop you from doing wrong. The donkey saw me and got out of the way. If she hadn’t . I would have killed you and saved her alive.”
Numbers 22:21-33

Have a wonderful day.