Numbers 22 - 24
Balaam was a gentile prophet of Jahweh, and the king of Moab sought to bribe him to curse the countless multitude of Israel in the desert east of the Jordan river, and opposite Jericho. Balaam had a divided heart, where he wanted to serve God, but he wanted riches even more, and looked for every opportunity to stay within God’s command, but to also please Balak.
In Numbers 31 Balaam will be killed when Israel defeats the Midianites, and he becomes a model of compromise for us to avoid (2 Peter 2:15). He never cursed Israel, but he advised Balak to have the daughters of Moab intermarry with the Israelites, so as to perpetuate idolatry in Israel.