While Israel was staying in Acacia Grove, the people began to have sexual relations with the women of Moab.
References for Numbers 25:1
The women invited them to the sacrifices for their gods, and the people ate and bowed in worship to their gods.
References for Numbers 25:2
So Israel aligned itself with Baal of Peor, and the Lord's anger burned against Israel.
References for Numbers 25:3
The Lord said to Moses, "Take all the leaders of the people and execute them in broad daylight before the Lord so that His burning anger may turn away from Israel."
References for Numbers 25:4
So Moses told Israel's judges, "Kill each of the men who aligned themselves with Baal of Peor."