Rabbinic tradition, recorded in the Talmud, tractate Horayot and elsewhere, and later codified by Maimonides, holds that the original batch of anointing oil compounded by Moses in the wilderness miraculously never diminished despite centuries of use anointing successive High Priests and, in Jewish tradition, several kings, and remained in use through the First Temple period until it was hidden away, according to rabbinic accounts by King Josiah before the Babylonian destruction of Jerusalem in 586 BCE, anticipating the exile. The Second Temple, built after the return from Babylonian exile, is understood in this tradition to have functioned without the original anointing oil at all, its priests consecrated instead by investiture with the priestly garments alone, a change rabbinic sources treat as one of several ways the Second Temple's sanctity was held to fall short of the First's.
The oil's disappearance placed it, alongside the Ark of the Covenant itself, among the sacred objects Jewish tradition holds are hidden rather than destroyed, expected in some eschatological readings to be restored in a future messianic age together with a rebuilt Temple. Maimonides' legal code, the Mishneh Torah, discusses the anointing oil's original composition and its restricted status in detail as part of his broader codification of Temple law, preserving the Exodus recipe and its prohibitions as a matter of settled halakhah even though, in the absence of a Temple, the law has had no occasion for practical application for two millennia, one of a substantial body of Temple-dependent commandments Jewish law retains in codified form pending, in traditional belief, a future restoration.