Deuteronomy 18:20

But if a prophet, having been corrupted by arrogance, chooses to speak, in my name, things which I did not instruct him to say, or to speak in the name of foreign gods, he shall be put to death

Other versions

King James Version

But the prophet, which shall presume to speak a word in my name, which I have not commanded him to speak, or that shall speak in the name of other gods, even that prophet shall die.

English Standard Version

But the prophet who presumes to speak a word in my name that I have not commanded him to speak, or who speaks in the name of other gods, that same prophet shall die.'

New International Version

But a prophet who presumes to speak in my name anything I have not commanded him to say, or a prophet who speaks in the name of other gods, must be put to death."