Maimonides addresses the lefi sha’ah and hora’at sha’ah and hasha’ah tzrikhah. In his Mishneh Torah, Hilkhot Yesodei Hatorah 9:3, he says that the concept of the exceptional rule does not only apply to a prophet but to the whole Jewish community (or court) as a whole. He cites a Midrash and the Talmuds as an example. The Jewish court rules that:
“When a prophet…tells us to violate one or many of the Torah mitzvot…it is a mitzvah to listen to him. We learned this from the early sages, who had it as a part of oral law…we must accept his [the prophet’s] decree in all things except idol worship according to the needs of the hour [lefi sha’ah]. For example, Elijah [in I Kings 18] sacrificed on Mount Carmel, outside the Temple premises.”
In his Mishneh Torah, Hilkhot Mamrim 2:4, Maimonides derives this ruling from Deuteronomy 18:15, writing that a Torah law may be abolished temporarily. That is to say, that this temporal ruling follows under the extraordinary need of the hour, a hora’at sha’ah. Thus, if the court finds it necessary to nullify biblical enactments as sanctioned by the Torah law, it is permitted but its effects are only done in a temporary measure. For example, a doctor may see fit to amputate an arm or a leg if necessary to save the life of a person. This runs reminiscent to the Babylonian Talmud, Yoma 85b:
"one should desecrate a single Sabbath to save a person’s life and make it possible for him to observe many Sabbaths."
The Babylonian Talmud, Nidah 61b, writes of the opinion of Rabbi Joseph:
“The mitzvot [commandments] will be abolished in the time to come.”
The medieval (fourteenth century) Rabbi Joseph Albo wrote in his Sefer Ha-ikkarim that a future prophet may abolish or nullify all the biblical enactments save the Decalogue (the Ten Commandments).