הלכה אויף דברים 17:15

שׂ֣וֹם תָּשִׂ֤ים עָלֶ֙יךָ֙ מֶ֔לֶךְ אֲשֶׁ֥ר יִבְחַ֛ר יְהוָ֥ה אֱלֹהֶ֖יךָ בּ֑וֹ מִקֶּ֣רֶב אַחֶ֗יךָ תָּשִׂ֤ים עָלֶ֙יךָ֙ מֶ֔לֶךְ לֹ֣א תוּכַ֗ל לָתֵ֤ת עָלֶ֙יךָ֙ אִ֣ישׁ נָכְרִ֔י אֲשֶׁ֥ר לֹֽא־אָחִ֖יךָ הֽוּא׃

מאַכן זאָלסטו מאַכן אַ מלך איבער דיר דעם װאָס ה׳ דײַן גאָט װעט אים אױסדערװײלן; פֿון צװישן דײַנע ברידער זאָלסטו מאַכן איבער דיר אַ מלך; טאָרסט ניט אױפֿזעצן איבער דיר אַ פֿרעמדן מאַן, װאָס איז ניט דײַנער אַ ברודער.

Mishneh Torah, Kings and Wars

Israel was enjoined with three Commandments upon entering the Land: to appoint a king, as it says, “you shall set a king over yourselves” (Deut. 17:15); to destroy the descendents of Amalek, as it says “erase the memory of Amalek” (Deut. 25:19); and build the Temple, as it says, “you shall seek His habitation, and there you will come” (Deut. 12:5).
פֿרעגט אַ רבֿBookmarkShareCopy

Mishneh Torah, Kings and Wars

A convert may not be appointed king, even after many generations, until one has a Jewish mother, as it says, “You cannot place over yourselves a foreign man, one who is not your brother” (Deut. 17:15). This rule is also applicable for any governing Position, and includes a commander in the Army and any officer in the Army1Lit., officers of the fifties or tens., or even the one who is merely responsible for the reservoir which irrigates the fields. It goes without saying that a convert cannot be appointed Judge or President. All these Positions must be filled by (born) Jews, as it says, “place upon yourselves a king from those who are close to you” (ibid.). All official, governing Positions must be filled with those from among our brethren.
פֿרעגט אַ רבֿBookmarkShareCopy

Mishneh Torah, Kings and Wars

A woman may not be appointed queen, as it says, “upon yourselves a king” (Deut. 17:15) - a “king” and not a “queen”. A woman may not be appointed to any Position2Lit., mission. in Israel. Only may a man.
פֿרעגט אַ רבֿBookmarkShareCopy