Maimonides writes: "The anointed king is destined to stand up and restore the Davidic Kingdom to its antiquity, to the first sovereignty. He will build the Temple in Jerusalem and gather the strayed ones of Israel together. All laws will return in his days as they were before: Sacrificial offerings are offered and the Sabbatical years and Jubilees are kept, according to all its precepts that are mentioned in the Torah. Whoever does not believe in him, or whoever does not wait for his coming, not only does he defy the other prophets, but also the Torah and Moses our teacher. For the Torah testifies about him, thus: "And the Lord Your God will return your returned ones and will show you mercy and will return and gather you... If your strayed one shall be at the edge of Heaven... And He shall bring you" etc.(Deuteronomy 30:3-5)." "These words that are explicitly stated in the Torah, encompass and include all the words spoken by all the prophets. In the section of Torah referring to Bala'am, too, it is stated, and there he prophesied about the two anointed ones: The first anointed one is David, who saved Israel from all their oppressors; and the last anointed one will stand up from among his descendants and saves Israel in the end. This is what he says (Numbers 24:17-18): "I see him but not now" - this is David; "I behold him but not near" - this is the anointed king. "A star has shot forth from Jacob" - this is David; "And a brand will rise up from Israel" - this is the anointed king. "And he will smash the edges of Moab" - This is David, as it states: "...And he struck Moab and measured them by rope" (II Samuel 8:2); "And he will uproot all Children of Seth" - this is the anointed king, of whom it is stated: "And his reign shall be from sea to sea" (Zechariah 9:10). "And Edom shall be possessed" - this is David, thus: "And Edom became David's as slaves etc." (II Samuel 8:6); "And Se'ir shall be possessed by its enemy" - this is the anointed king, thus: "And saviors shall go up Mount Zion to judge Mount Esau, and the Kingdom shall be the Lord's" (Obadiah 1:21)." "And by the Towns of Refuge it states: "And if the Lord your God will widen up your territory... you shall add on for you another three towns" etc. (Deuteronomy 19:8-9). Now this thing never happened; and the Holy One does not command in vain. But as for the words of the prophets, this matter needs no proof, as all their books are full with this issue." "Do not imagine that the anointed king must perform miracles and signs and create new things in the world or resurrect the dead and so on. The matter is not so: For Rabbi Akiva was a great scholar of the sages of the Mishnah, and he was the assistant-warrior of the king Bar Kokhba, and claimed that he was the anointed king. He and all the Sages of his generation deemed him the anointed king, until he was killed by sins; only since he was killed, they knew that he was not. The Sages asked him neither a miracle nor a sign..." "And if a king shall arise from among the House of David, studying Torah and indulging in commandments like his father David, according to the written and oral Torah, and he will impel all of Israel to follow it and to strengthen breaches in its observance, and will fight Hashem's [God's] wars, this one is to be treated as if he were the anointed one. If he succeeded and built a Holy Temple in its proper place and gathered the disperesed ones of Israel together, this is indeed the anointed one for certain, and he will mend the entire world to worship the Lord together, as it is stated: "For then I shall turn for the nations a clear tongue, to call all in the Name of the Lord and to worship Him with one shoulder (Zephaniah 3:9)." "But if he did not succeed to this degree, or if he was killed, it becomes known that he is not this one of whom the Torah had promised us, and he is indeed like all proper and wholesome kings of the House of David who died. The Holy One, Blessed Be He, only set him up to try the public by him, thus: "Some of the wise men will stumble in clarifying these words, and in elucidating and interpreting when the time of the end will be, for it is not yet the designated time." (Daniel 11:35)."