Balak was king over Moav. After seeing that the Jews had just defeated 2 powerful giants Sichon and Og (in the previous parasha), the Moavim were seized with fright as Am Israel approached them.
Balak sends for Bilam, a prophet and sorcerer, to curse Am Israel so they could be defeated.
Hashem appears to Bilam in a dream and allows him to go with Balak with the condition not to curse the Jews.
On his way with Balak, Bilam was riding on his she-ass when an angel appears. The she-ass saw that the angel had his sword drawn and turned from the path, but Bilam, who did not perceive the angel, hit the animal and drove it back on to the road.
And this happened 3 times, that the she-ass saw the angel, and on the 3rd time that Bilam hits the animal, this one says to Bilam:
“What have I done that I deserved to be beaten 3 times?”
That´s when Hashem reveals the angel so Bilam can see it and the angel tells him that he will only say what Hashem allows him to say.
Bilam arrives with Balak and is ready to curse the Jews and erase their memory from the face of the earth. (chas ve shalom).
As Bilam was formulating a curse in his heart, Hashem twisted his tongue and out of his mouth came out the best BLESSINGS!!! And this occurred 3 times.
When Bilam sees Balak getting angry, he tells him that he will ONLY be able to say what Hashem allows him to say.
And so Bilam ( who knew which sin is the one that most damages the relationship between Hashem and Am Israel) advises Balak to set up at trap and seduce the Jewish men to sin.
And that´s what Balak did, the Midyanite girls seduced the Jewish men, and the people of Israel denigrated themselves!!!
And the anger of Hashem was kindled against Israel and a plague attacks killing many.
Following Hashem´s orders, Moshe executes all those involved in this disgraceful act.
And Pinchas, grandson of Aharon, appears and kills Zimri (corrupt leader from the tribe of Shimon), who is caught in the middle of an atrocious with a Midyanite woman, and in front of everyone, he executes them by thrusting his spear through both Zimri and Kozbi.
Pinchas´s zealous act stopped Hashem´s fury and the plague came to an end.
24,000 Jews died in the plague (all from the Tribe of Shimon!)
¡¡ SHABAT SHALOM !!