Numbers 25:2-4

ISV(i) 2 who also invited the people to the sacrifices of their gods. So the people ate what they had sacrificed and then worshipped their gods. 3 The people joined the Baal-peor cult. As a result, the anger of the LORD flared up against Israel, 4 so the LORD told Moses, “Take all the leaders of the people and execute them in broad daylight for the LORD, so the LORD’s burning anger may be withdrawn from Israel.”