The Rambam states1 :

“..A King will arise from the house of (King) David, one who delves in Torah study and is occupied in mitzvos just as David his father, following the Written and Oral Torah; he will coerce and influence all Jews to go in its path and to strengthen its weakness, and he will fight the battle of G‑d — this is a sign that he is Moshiach. If he succeeds, he will then rebuild the Beis Hamikdash (Holy Temple) in its place and will gather the ingathering of Jews from exile — then he is definitely Moshiach. He will also prepare the whole world to serve G‑d together, as is written,2 “Then will I change unto the people a pure language, that they may all call on the name of G‑d, to serve Him with one accord.”