Deuteronomy 18:15-22 NRSV
The LORD your God will raise up for you a prophet like me from among your own people; you shall heed such a prophet. This is what you requested of the LORD your God at Horeb on the day of the assembly when you said: “If I hear the voice of the LORD my God any more, or ever again see this great fire, I will die.” Then the LORD replied to me: “They are right in what they have said. 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. Anyone who does not heed the words that the prophet shall speak in my name, I myself will hold accountable. 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.” You may say to yourself, “How can we recognize a word that the LORD has not spoken?” 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.
NRSV: New Revised Standard Version