The 172nd mitzvah is that we are commanded to obey each of the Prophets, may they rest in peace, and to fulfill all their instructions. Even if his instructions contradict one or many of these commandments, [we are commanded to obey him] as long as his instructions are temporary. This does not apply, however, if he permanently adds or subtracts [from the commandments], as we explained in the Introduction to our Commentary on the Mishneh.1

The source of this commandment is G‑d's statement (exalted be He),2 "To him you must listen." In the words of the Sifri: "The verse, 'To him you must listen,' means that even if he tells you to temporarily3 transgress one of the commandments of the Torah, you must listen to him."

One who transgresses this mitzvah is punished by mita bidei shamayim, as it says in G‑d's statement (exalted be He)4 "If any person does not listen to My word that he declares in My name, I will punish him." It has been explained in tractate Sanhedrin5 that three are punished by mita bidei shamayim: one who disobeys the prophet, a prophet who disobeys his own prophecy, and a prophet who conceals his prophecy.6 All of them are derived from the phrase, "If any person does not listen." Our Sages said, "The phrase, lo yishma ['does not listen'] can also be read, lo yishamei ['does not listen to himself'] and lo yashmia ['does not make others listen']."7

The details of this mitzvah have been explained in the end of tractate Sanhedrin.8