The establishment of a monarchy in Israel is a complex institution. The primary approach among commentators is that appointing a king is a positive commandment designed to prevent anarchy, enforce the law, and maintain social and legal order [רבנו בחיי, רלב״ג, בכור שור, חזקוני, רש״ר הירש]. Beyond his practical duties, the king serves as a spiritual model. By completely nullifying himself before God, he inspires the entire nation [חומש קה״ת]. Conversely, an alternative perspective suggests that seeking a king is not an ideal obligation but a concession to human nature, much like the laws concerning a captive woman in wartime. This explains why the prophet Samuel was so angered when the nation demanded a monarch [ביאור יש״ר]. Reconciling this tension, [כלי יקר] offers a deep political and psychological analysis. God desires a king who rules with authority and instills awe to uphold the law. However, in the days of Samuel, the people did not ask for a king to rule over them, but rather one who would be subject to them. They demanded a leader who would flatter them, submit to their control, and judge them according to gentile customs, effectively rejecting the direct rule of God.
The laws governing the monarchy demand absolute continuity and reverence. If a king passes away, there is an immediate obligation to appoint a successor to ensure the throne never remains vacant [מלבי״ם, אדרת אליהו, תורה תמימה]. Furthermore, the leadership is specifically designated for a king, rather than a queen [רלב״ג, מלבי״ם, אדרת אליהו]. A foundational element of this rule is that the awe of the king must be absolute. Out of profound respect, it is forbidden to ride the king's horse, sit on his throne, use his scepter, or view him in any undignified state, such as when he is getting a haircut or unclothed [רבנו בחיי, תורה תמימה, אדרת אליהו, בכור שור]. Ultimately, the true king is not chosen merely by the people, but by God Himself, either through a prophet or the Urim and Thummim [רמב״ן, אבן עזרא, רלב״ג, ביאור שטיינזלץ, חזקוני, בכור שור]. This reflects a broader principle of divine providence, recognizing that all earthly power, no matter how small, is decreed from heaven [רמב״ן, רבנו בחיי].
This divine selection raises a fundamental question. If the king is chosen directly by God through a prophet, why is there a severe warning against appointing a foreigner? Surely, God would not select a non-Jew to rule over Israel. To resolve this, several commentators explain that the laws of monarchy address two distinct historical eras [רמב״ן, ביאור יש״ר, רש״ר הירש, אם למקרא]. In the ideal state, prophecy exists, and God directly selects the monarch. However, anticipating a future era without prophecy, such as the period of the Second Temple, the nation would eventually have to choose its own leaders. It is specifically for these later times that the strict prohibition against crowning a foreign king was given.
When the people appoint a leader, strict qualifications apply. The king must possess Jewish lineage, at least from his mother's side [תורה תמימה, בכור שור, פני דוד, רש״ר הירש]. He must also be a local resident from the Land of Israel who lives among the people, rather than an outsider brought in from abroad [מלבי״ם, אדרת אליהו, תורה תמימה]. The prohibition against appointing a foreigner stems from the severe risk that an alien king might incite the nation toward idolatry or force them to return to Egypt to amass horses for his military [אבן עזרא, רשב״ם, בכור שור, חזקוני]. The inability to appoint a foreigner is not a matter of physical limitation, but an absolute legal prohibition; the nation simply has no lawful authority to do so [אבן עזרא, חזקוני]. This restriction is so absolute that a foreigner cannot be given even a temporary or partial role of authority [מלבי״ם]. Furthermore, a slave is disqualified from the monarchy. Even though a slave is obligated to observe certain commandments, he is not considered a brother in the context of public leadership [מלבי״ם, אדרת אליהו]. These stringent requirements are not limited to the throne. They apply to all positions of public authority in Israel, which must always be filled from within the nation [תורה תמימה, מלבי״ם, בכור שור]. In the absence of a literal monarchy, this authority transfers to Torah leadership, creating a personal obligation for every individual to appoint a rabbi to guide them on their spiritual path [חומש קה״ת].