Balaam בלעם
a gentile prophet hired to curse Israel
Bilam son of Beor was a prophet to the nations — tradition says he was given so they could not claim they had no Moshe of their own. The gift was real; the character was not.
Balak of Moav, frightened by Israel, sent rich gifts: «whom you bless is blessed and whom you curse is cursed». Bilam first refuses, then bargains, then goes. On the road his donkey sees an angel with a drawn sword and turns aside three times; when he beats her she speaks — the Torah's only talking animal.
Three times he climbs the heights to curse, and three times says the opposite. His last words became the opening line of the morning prayer: «How goodly are your tents, Yaakov.» The sages explain that he saw the tent openings did not face one another — a people that respects a neighbour's privacy.
Unable to curse, he advised Balak differently: seduce Israel through Moabite women and the cult of Baal Peor. It worked, and 24,000 died. Bilam was killed in the war with Midian in 2488.