Numbers 25:4-9 - God's Punishment

4 The Lord said to Moses, “Take all the leaders of the people [who have committed sin with the Moabites], and execute them in broad daylight before the Lord, so that the fierce anger of the Lord may turn away from Israel.”

5 So Moses said to the judges of Israel, “Each one of you must kill his men who have joined themselves to Baal of Peor [in worship].”

6 Then one of the Israelites came and presented to his relatives a Midianite woman, in the sight of Moses and the whole congregation of the Israelites, while they were weeping [over God’s judgment] at the doorway of the Tent of Meeting (tabernacle). 7 When Phinehas the son of Eleazar, the son of Aaron the priest, saw this, he left the congregation and took a spear in his hand, 8 and he went after the man of Israel into the tent, and pierced both of them through the body, the man of Israel and the woman. Then the plague on the Israelites stopped. 9 Nevertheless, those [Israelites] who died in the plague numbered 24,000.