Deuteronomy 18:20

20 But any prophet who speaks in the name of other gods, or who presumes to speak in my name a word that I have not commanded the prophet to speak—that prophet shall die."

Deuteronomy 18:20 In-Context

18 I will raise up for them a prophet like you from among their own people; I will put my words in the mouth of the prophet, who shall speak to them everything that I command.
19 Anyone who does not heed the words that the prophet shall speak in my name, I myself will hold accountable.
20 But any prophet who speaks in the name of other gods, or who presumes to speak in my name a word that I have not commanded the prophet to speak—that prophet shall die."
21 You may say to yourself, "How can we recognize a word that the Lord has not spoken?"
22 If a prophet speaks in the name of the Lord but the thing does not take place or prove true, it is a word that the Lord has not spoken. The prophet has spoken it presumptuously; do not be frightened by it.
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.