Numbers 25:4-9 - God's Punishment
4 The LORD said to Moses, "Take all the leaders of the people 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 of you slay his men who have joined themselves to Baal of Peor."
6 Then behold, one of the sons of Israel came and brought to his relatives a Midianite woman, in the sight of Moses and in the sight of all the congregation of the sons of Israel, while they were weeping at the doorway of the tent of meeting. 7 When Phinehas the son of Eleazar, the son of Aaron the priest, saw it, he arose from the midst of 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 man of Israel and the woman, through the body. So the plague on the sons of Israel was checked. 9 Those who died by the plague were 24,000.