He adds moreover: "for I know," he says, "that those whom you have blessed will be blessed, and those whom you have cursed will be cursed." I do not believe that the king knew that whomever Balaam had blessed would be blessed; but it seems to me that he says these things for the sake of flattery, so that, exalting and extolling his art, he may render him more ready for the crime. For the magical art does not know how to bless, because neither do demons know how to do good. Isaac and Jacob know how to bless, and all the saints; none of the impious knows how to bless. But at length the envoys co...me to Balaam. For "there came," he says, "the elders of Moab and the elders of Midian, and the divinations in their hands." Among those arts of divination which human curiosity has devised, there are certain things which Scripture indeed has named "divinations," but which Gentile custom calls either tripods or cauldrons or by other terms of this kind; which, as if consecrated to this very purpose, are wont to be moved and handled by these people. Divine Scripture indeed names a certain ephod in the vernacular tongue in the prophets, which they hand down to be the garment of those who prophesy. Yet in the divine Scriptures one thing is held to be prophecy, another divination; for it says: "there shall be no augury in Jacob, nor divination in Israel. In due time it shall be told to Jacob and Israel what God is about to do." Divination, then, is utterly renounced; for it is fulfilled by the work and ministry of demons, as we have already said above. Balaam, therefore, having received the divinations, when the demons were wont to come to him, sees indeed that the demons are put to flight, but that God is present; and therefore he says that he is consulting God, because he nowhere sees the demons accustomed to obey him. God himself, then, comes to Balaam, not because he was worthy that God should come to him, but so that those might be put to flight who were accustomed to be present to him for cursing and doing harm; for from this point God was already providing for his people. He is present, then, and God says to him: "why have these men come to you?" And Balaam said to God: "Balak, son of Zippor, king of Moab, sent them to me, saying: behold, a people has gone out from Egypt, and has covered the face of the earth, and this one sits beside me; come now, therefore, and curse it for me, if perhaps we may be able to strike it and drive it out." And God said to Balaam: "you shall not go with them, nor shall you curse the people; for it is blessed."
Source: HOMILIES ON NUMBERS 13.6