Numbers 22 describes Balaam riding his donkey toward Balak. The donkey saw the angel of the Lord with drawn sword three times and tried to avoid him, while Balaam, unable to see the angel, beat the animal. The Lord opened the donkey's mouth, and she protested Balaam's treatment. God then opened Balaam's eyes so he too saw the angel and recognized his peril. Second
Peter later refers to the speaking donkey as a rebuke of Balaam's madness.