Balaam instructs Balak to build seven altars and prepare seven bulls and seven rams, blending pagan customs with the worship of the true God, intending to curse Israel. Despite the heathenish nature of the sacrifices, God intervenes, putting words in Balaam's mouth to bless Israel instead. The episode highlights Balaam's manipulation of religious rites for personal gain while ultimately serving God's purposes.