Later, Numbers 25:1-9 describes how Israel engaged in the Heresy of Peor. Numbers 31:16 blames this on Balaam's advice and because of his culpability in the incident, which resulted in deadly divine judgements against the Israelites who participated, he was eventually killed in a retaliatory battle against Midian in Numbers 31:8.