While Israel was camped at Shittim (Acacia Grove), the men began to have sex with the Moabite women.
It started when the women invited the men to their sex-and-religion worship. They ate together and then worshiped their gods.
Israel ended up joining in the worship of the Baal of Peor. God was furious, his anger blazing out against Israel.
God said to Moses, "Take all the leaders of Israel and kill them by hanging, leaving them publicly exposed in order to turn God's anger away from Israel."
Moses issued orders to the judges of Israel: "Each of you must execute the men under your jurisdiction who joined in the worship of Baal Peor."
Just then, while everyone was weeping in penitence at the entrance of the Tent of Meeting, an Israelite man, flaunting his behavior in front of Moses and the whole assembly, paraded a Midianite woman into his family tent.
Phinehas son of Eleazar, the son of Aaron the priest, saw what he was doing, grabbed his spear,
and followed them into the tent. With one thrust he drove the spear through the two of them, the man of Israel and the woman, right through their private parts. That stopped the plague from continuing among the People of Israel.
Published by permission. Originally published by NavPress in English as THE MESSAGE: The Bible in Contemporary Language copyright 2002 by Eugene Peterson. All rights reserved. (The Message Bible Online)