Mishneh Torah – Laws of Kings and Wars
Mishneh Torah, Kings and Wars 1:7-10
The Rambam rules that kingship belongs exclusively to the Davidic dynasty, and that anyone who assumes the monarchy from another tribe transgresses a prohibition — directly relevant to the Hasmonean kohanim who assumed royal status.
נָבִיא שֶׁהֶעֱמִיד מֶלֶךְ מִשְּׁאָר שִׁבְטֵי יִשְׂרָאֵל. וְהָיָה אוֹתוֹ הַמֶּלֶךְ הוֹלֵךְ בְּדֶרֶךְ הַתּוֹרָה וְהַמִּצְוָה וְנִלְחָם מִלְחֲמוֹת ה'. הֲרֵי זֶה מֶלֶךְ וְכָל מִצְוֹת הַמַּלְכוּת נוֹהֲגוֹת בּוֹ. אַף עַל פִּי שֶׁעִקַּר הַמַּלְכוּת לְדָוִד. וְיִהְיֶה מִבָּנָיו מֶלֶךְ. שֶׁהֲרֵי אֲחִיָּה הַשִּׁילוֹנִי הֶעֱמִיד יָרָבְעָם וְאָמַר לוֹ (מלכים א יא לח) "וְהָיָה אִם שָׁמוֹעַ תִּשְׁמַע אֶת כָּל אֲשֶׁר אֲצַוֶּךָ וּבָנִיתִי לְךָ בַיִת נֶאֱמָן כַּאֲשֶׁר בָּנִיתִי לְדָוִד" וְגוֹ'. וְאָמַר לוֹ אֲחִיָּה (מלכים א יא לו) "וְלִבְנוֹ אֶתֵּן שֵׁבֶט אֶחָד לְמַעַן הֱיוֹת נִיר לְדָוִיד עַבְדִּי כָּל הַיָּמִים לְפָנַי בִּירוּשָׁלַםִ": מַלְכֵי בֵּית דָּוִד הֵם הָעוֹמְדִים לְעוֹלָם שֶׁנֶּאֱמַר (שמואל ב ז טז) "כִּסְאֲךָ יִהְיֶה נָכוֹן עַד עוֹלָם". אֲבָל אִם יַעֲמֹד מֶלֶךְ מִשְּׁאָר יִשְׂרָאֵל תִּפָּסֵק הַמַּלְכוּת מִבֵּיתוֹ. שֶׁהֲרֵי נֶאֱמַר לְיָרָבְעָם (מלכים א יא לט) "אַךְ לֹא כָל הַיָּמִים":
If a prophet appoints a king from any other tribe of Israel and that king follows the path of Torah and mitzvot and fights the wars of God, he is considered as a king, and all the commandments associated with the monarchy apply to him. Although the kingship was primarily given to David and one of his descendents will be serving as king, there is halachic legitimacy to the rule of other kings. Behold, Achiyah of Shilo appointed Jeroboam and told him (I Kings 11:38 : 'And it shall be that if you obey all that I command you... I will build you a faithful house as I built for David.' Similarly, Achiyah told him (ibid.: 36): 'To his (David's) son, I will grant one tribe, so that David, My servant, will always have sovereignty before Me in Jerusalem.' The kings of the Davidic dynasty will prevail forever (II Samuel 7:16 : 'Your throne shall be established forever.' In contrast, should a king arise from other Israelites, the monarchy will eventually cease from his descendents. For behold, Jeroboam was told: I Kings 11:39 'I will afflict the House of David.... but not forever.'