The 173rd mitzvah is that we are commanded to appoint over ourselves a Jewish king to speak for us1 and lead us.

The source of this commandment is G‑d's statement2 (exalted be He), "You shall appoint for yourselves a king."

We have mentioned previously3 the statement of our Sages in the Sifri,4 "The Jewish people were commanded three mitzvos upon entering the Land of Israel: to appoint a king, to build the Holy Temple, and to destroy the descendants of Amalek." Our Sages also said in the Sifri,5 "The verse, 'You shall appoint for yourselves a king,' constitutes a positive commandment."

This commandment is explained as follows:6 "The verse, 'You shall appoint for yourselves a king,' means that you must instill in yourselves awe of him."7 We should think of him with the greatest possible respect, and awareness of his great and exalted status, to the extent that in our eyes he is greater than any of the prophets of that generation.8

We are required to fulfill any command the king issues unless it contradicts a commandment of the Torah. If a person transgresses the king's command and does not fulfill it, the king is allowed to execute him by the sword. Our ancestors, may they rest in peace, accepted this upon themselves when they said [to Joshua9], "Whoever rebels against your statement, and does not obey all your commands shall be put to death." Anyone who rebels against a king who was appointed in accordance with the Torah, may be executed by the king.

All the details of this mitzvah are explained in the second chapter of tractate Sanhedrin,10 the first chapter of Kerisus,11 and the seventh chapter of Sotah.12