A donkey saw an angel before the greatest prophet of the ancient Near East did. That detail alone tells you everything about the story of Balaam.
Balak, the king of Moab, was terrified. The Israelites had crushed Sihon king of the Amorites and Og king of Bashan—two formidable powers—and were now camped on his border. Balak could not beat them in battle, so he tried something else. He and the Midianites hired Balaam, a prophet who lived near the Euphrates and whose curses were legendary, to come and destroy Israel with words.
God told Balaam not to go. Balaam told the ambassadors. They came back with bigger bribes. Balaam asked God again—and this time, God let him go, but with a warning. On the road, an angel with a drawn sword blocked the path. The donkey saw it. Balaam did not. Three times the animal swerved or stopped, and three times Balaam struck her. Then the donkey spoke in a human voice and asked him why he was beating her after years of faithful service (Numbers 22:28). Only then did Balaam's eyes open. The angel rebuked him: the animal had more spiritual perception than the prophet himself.
Balaam arrived at Balak's court and was brought to a mountain overlooking the Israelite camp. Seven altars were built, seven bulls and seven rams sacrificed. Balak wanted a curse. What he got was the opposite. The spirit of God seized Balaam, and he poured out one of the most extravagant blessings in all of ancient literature: Israel would possess innumerable good things, fill the earth and seas with their glory, and have descendants more plentiful than the stars. Their enemies would come to fight and never return victorious.
Balak was furious. He tried again—more altars, more sacrifices, a different mountain. Same result. God would not allow a single curse against Israel. Balaam himself admitted it plainly: "When the Spirit of God seizes upon us, nothing that we say is our own." The man hired to destroy Israel became the instrument of its greatest prophecy of blessing.