Numbers 25:4

4 The LORD said to Moses, “Take all the leaders of these people, kill them and expose them in broad daylight before the LORD, so that the LORD’s fierce anger may turn away from Israel.”

Read Numbers 25:4 Using Other Translations

And the LORD said unto Moses, Take all the heads of the people, and hang them up before the LORD against the sun, that the fierce anger of the LORD may be turned away from Israel.
And the LORD said to Moses, "Take all the chiefs of the people and hang them in the sun before the LORD, that the fierce anger of the LORD may turn away from Israel."
The LORD issued the following command to Moses: “Seize all the ringleaders and execute them before the LORD in broad daylight, so his fierce anger will turn away from the people of Israel.”

What does Numbers 25:4 mean?

John Gill's Exposition of the Bible
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.

California - Do Not Sell My Personal Information  California - CCPA Notice