Numbers 25:6-9 New Revised Standard Version (NRSV)
6 Just then one of the Israelites came and brought a Midianite woman into his family, in the sight of Moses and in the sight of the whole congregation of the Israelites, while they were weeping at the entrance of the tent of meeting. 7 When Phinehas son of Eleazar, son of Aaron the priest, saw it, he got up and left the congregation. Taking a spear in his hand, 8 he went after the Israelite man into the tent, and pierced the two of them, the Israelite and the woman, through the belly. So the plague was stopped among the people of Israel. 9 Nevertheless those that died by the plague were twenty-four thousand.