Balaam, to an extent, had knowledge of the true God, at one point calling Jehovah ‘his God,’ (Nu. 22:18).
Still, he persisted in collaborating with the Midianites and the Moabites in their endeavor to curse Israel.
These people had a pagan form of worship involving sexual promiscuity in the sacrifices they offered to Ba’al of Pe’or (Nu. 25:1-3).
The chieftains had promised Balaam riches in exchange for a curse, for they acknowledged that ‘the one whom he blessed was blessed and the one whom he cursed was cursed,’ (Nu. 22:6).
What they did not take into account is that Jehovah cannot be bought out nor does he follow the orders of man.
In their practices of divination, these people implored favor of their gods without making personal sacrifices in the way of kindness, repentance or moral conduct.
Because of this and God’s promises to the patriarchs, he would never favor them over Israel.
Today, it would be wrong of us to pray for or persist in pursuing something that goes against God’s expressed will.
This is especially true if we are motivated by purely selfish reasons as in the case of Balaam, whose greed led him to lose all of God’s favor and be executed (Nu. 31:8).