Balaam ♂, was a prophet.
Balaam was ordered by Balak, king of the Moabites to go and curse the Israelites. When the first delegation arrived, Balaam asked God about his will. God told him, that he should not leave with the delegation, so he sent them back to Balak. Later Balak sent a second delegation to Balaam. Again he asked God what he should do. This time, God allowed him to go, but he would only be allowed to speak, what God told him. On the way to Balak, the angel of the Lord opposed Balaam. The angel warned Balaam again, only to speak what he would tell him.
When Balaam had finally arrived at Balak's place, they went to Kiriath Huzoth. There Balak sacrificed cattle and sheep. The next morning, they went to Bamoth Baal from where they saw a part of the people of Israel. Balaam ordered seven altars to be built. Then they offered a bull and a ram on each of the altars. Balaam then talked with God and God put a blessing over Israel in his mouth.
Balak was disturbed by this and brought Balaam to another place, the field of Zophim on top of Pisgah. Again they built seven altars and offered a bull and a ram on each. And again Balaam met with the Lord. Balaam then reported to Balak, that God did not and would not change his mind.
Then Balak took Balaam to the top of Peor. They built another seven altars, offering another seven bulls and rams on each. This time Balaam was filled by the spirit of God and prophesied over Israel. He said for example, that their king would be greater than Agag. All this angered Balak and sent him away without rewarding him.
Balaam was killed with the Midianites when the Israelites attacked and killed them. It appears that Balaam adviced the Midianites to seduce the Israelites into worshiping the Baal of Peor and have sexual relations with the Israelites.