Deuteronomy 18:20

20 `Only, the prophet who presumeth to speak a word in My name -- that which I have not commanded him to speak -- and who speaketh in the name of other gods -- even that prophet hath died.

Deuteronomy 18:20 In-Context

18 a prophet I raise up to them, out of the midst of their brethren, like to thee; and I have given my words in his mouth, and he hath spoken unto them all that which I command him;
19 and it hath been -- the man who doth not hearken unto My words which he doth speak in My name, I require [it] of him.
20 `Only, the prophet who presumeth to speak a word in My name -- that which I have not commanded him to speak -- and who speaketh in the name of other gods -- even that prophet hath died.
21 `And when thou sayest in thy heart, How do we know the word which Jehovah hath not spoken? --
22 that which the prophet speaketh in the name of Jehovah, and the thing is not, and cometh not -- it [is] the word which Jehovah hath not spoken; in presumption hath the prophet spoken it; -- thou art not afraid of him.
Young's Literal Translation is in the public domain.