“Along with those the Israelites put to death, they also killed the diviner, Balaam son of Beor, with the sword.”
Joshua 13:22 HCSB
https://www.bible.com/72/jos.13.22.hcsb
I find this interesting – Balaam did as the Lord directed him, but he was still put to death by the Israelites. At first I was not sure of the reason for this, then I did some research and came across the following:
‘“Yet they are the ones who, at Balaam’s advice, incited the Israelites to unfaithfulness against the Lord in the Peor incident, so that the plague came against the Lord ’s community. ‘
Numbers 31:16
https://my.bible.com/bible/72/NUM.31.16
Further, I found this:
‘While Israel was staying in the Acacia Grove, the people began to have sexual relations with the women of Moab. The women invited them to the sacrifices for their gods, and the people ate and bowed in worship to their gods. So Israel aligned itself with Baal of Peor, and the Lord ’s anger burned against Israel. ‘
Numbers 25:1-3
https://my.bible.com/bible/72/NUM.25.1-3
So now I understand that while Balaam followed the Lord’s word and did as commanded, he obviously also cause the people to sin by introducing other women to the people of Israel and causing them to chase after their Gods.