Balak

Balak, the king of Moav, is terrified after witnessing the Israelites destroy Sichon and Og (the powerful giants who were neighbouring kings). He and the Midianites, send officers to Bilam, the greatest non-Jewish prophet, asking him to curse the Jewish nation for them. Bilam tells the messengers to spend the night. During the night G-d appears to Bilam and forbids him from going with the men. Following this, Balak sends a second, more distinguished party to persuade Bilam. This time G-d gives Bilam permission to go but warns him that he will only be able to speak the words that G-d tells him. When Bilam sets out the next morning on his donkey G-d is angered that he thinks he will be able to defy G-d's word. He sends an angel, which Bilam does not see. His donkey can see the angel however, and veers off the path three times to avoid it. Each time Bilam beats his donkey to force it back onto the path. Finally G-d gives the donkey the power of speech. It turns to Bilam and complains about being beaten. Then G-d lets Bilam see the angel, standing with his sword drawn. Bilam repents, and G-d again tells him that he may only say the words that G-d gives him to speak.
Bilam arrives, and Balak gives him a royal welcome. Bilam and Balak ascend a mountain which overlooks the Israelite camp. Bilam instructs Balak to build seven altars for him, and to prepare seven bulls and seven rams. G-d appears to Bilam and places words in his mouth. Bilam returns to Balak, but instead of cursing the Jews, he blesses them and declaims their praises. Balak is furious, and takes Bilam to another vantage point, where he again offers seven bulls and seven rams on seven altars. Once more G-d puts a prophecy in Bilam's mouth, and he blesses Israel. Balak takes Bilam to one final summit overlooking a wasteland, and again they build seven altars. This time Bilam understands that G-d wants him to bless Israel, and he does so. Balak is furious with Bilam and tells him to flee. Bilam continues to prophesy about the other nations of the world. Then Bilam returns to his home, and Balak also goes on his way.
In Shittim some of the Jews begin to commit harlotry with the daughters of Moav (Moab). This eventually leads to them committing idolatry with the Moavite god Baal-Pe'or. G-d sends a plague upon the nation as punishment and commands Moshe to put all the idolaters to death. Zimri the head of the tribe of Shimon commits harlotry with Cozbi, a Midianite princess, in front of the entire nation. Pinchas, Aharon's grandson, runs up, chases them into the tent and pierces them both with a spear, killing them. This ends the plague in which altogether 24,000 people die.