Numbers 25:2-4

MLV(i) 2 for they called the people to the sacrifices of their gods. And the people ate and bowed-down to their gods. 3 And Israel joined himself to Baal-peor and the anger of Jehovah was kindled against Israel.
4 And Jehovah said to Moses, Take all the chiefs of the people and hang them up to Jehovah before the sun, that the fierce anger of Jehovah may turn away from Israel.