Bamidbar 25:4

4 And Hashem said unto Moshe, Take Kol Rashei HaAm, and kill them, hanging them [on a tree, stake], before Hashem against the shemesh, that the fierce Af Hashem (Anger of Hashem) may be turned away from Yisroel.

Bamidbar 25:4 Meaning and Commentary

Numbers 25:4

And the Lord said unto Moses
Being provoked with the sins of the people, he called to him out of the tabernacle, or out of the cloud:

take all the heads of the people,
the princes of the tribes, not to hang them, but to judge those that worshipped Peor, as Jarchi interprets it; though some think that these having sinned, were ordered to be taken and hanged, and made public examples of; but it can hardly be thought, though there were some that might be guilty of the above sins, as Zimri, yet not all of them:

hang them up before the Lord against the sun;
that is, those that were guilty of idolatry: the meaning is, and which all the Targums give into, that these heads of the people were to assemble at some proper place, the court of judicature, and order the delinquents to be brought before them, and try, judge, and condemn those they found guilty, and cause them to be hanged somewhere near the tabernacle, and before it, having neglected the worship of God there, and served an idol; and this was to be done openly in the daytime, that all might see and fear; and if it was the sun that was worshipped in this idol, as some think, they were hanged against the sun, to show that the idol they worshipped was not able to deliver them; but, in the face of it, and as it were in defiance of it, they were ordered to be hanged up; and this, according to the Targum of Jonathan, was in the morning against the rising sun, and where they hung all day, and were taken down at sun setting:

that the fierce anger of the Lord may be turned away from Israel;
when justice had taken place, and proper punishment was inflicted upon the criminals, whereby a just resentment was made against sin, and God glorified.

Bamidbar 25:4 In-Context

2 And they invited the people unto the zevakhim of their g-ds; and the people did eat and bowed down to their g-ds.
3 And Yisroel joined himself unto Baal-Peor [see Num.23:28]; and the Af Hashem was kindled against Yisroel.
4 And Hashem said unto Moshe, Take Kol Rashei HaAm, and kill them, hanging them [on a tree, stake], before Hashem against the shemesh, that the fierce Af Hashem (Anger of Hashem) may be turned away from Yisroel.
5 And Moshe said unto the shofetim of Yisroel, Slay ye every one his men that were joined unto Baal-Peor.
6 And, hinei, one of the Bnei Yisroel came and brought unto his brethren a woman from Midyan before the eyes of Moshe, and before the eyes of Kol Adat Bnei Yisroel, who were weeping before the entrance of the Ohel Mo’ed.
The Orthodox Jewish Bible fourth edition, OJB. Copyright 2002,2003,2008,2010, 2011 by Artists for Israel International. All rights reserved.