The Rambam · Sefer Shoftim
הלכות מלכים ומלחמות ה׳Kings and Wars 5
Chapter 5 of 12 in Kings and Wars — 12 halachot
Halacha 1א׳
אֵין הַמֶּלֶךְ נִלְחָם תְּחִלָּה אֶלָּא מִלְחֶמֶת מִצְוָה. וְאֵי זוֹ הִיא מִלְחֶמֶת מִצְוָה זוֹ מִלְחֶמֶת שִׁבְעָה עֲמָמִים. וּמִלְחֶמֶת עֲמָלֵק. וְעֶזְרַת יִשְׂרָאֵל מִיַּד צָר שֶׁבָּא עֲלֵיהֶם. וְאַחַר כָּךְ נִלְחָם בְּמִלְחֶמֶת הָרְשׁוּת וְהִיא הַמִּלְחָמָה שֶׁנִּלְחָם עִם שְׁאָר הָעַמִּים כְּדֵי לְהַרְחִיב גְּבוּל יִשְׂרָאֵל וּלְהַרְבּוֹת בִּגְדֻלָּתוֹ וְשִׁמְעוֹ:
At first, a king should fight only obligatory wars. Which wars are obligatory? The wars of the seven nations, and the war of Amalek, and saving Israel from an enemy who comes against them. And after that, he may fight a discretionary war, which means a war fought against any other nation in order to widen Israel's boundaries and increase its greatness and reputation.
Halacha 2ב׳
מִלְחֶמֶת מִצְוָה אֵינוֹ צָרִיךְ לִטּל בָּהּ רְשׁוּת בֵּית דִּין. אֶלָּא יוֹצֵא מֵעַצְמוֹ בְּכָל עֵת. וְכוֹפֶה הָעָם לָצֵאת. אֲבָל מִלְחֶמֶת הָרְשׁוּת אֵינוֹ מוֹצִיא הָעָם בָּהּ אֶלָּא עַל פִּי בֵּית דִּין שֶׁל שִׁבְעִים וְאֶחָד:
An obligatory war does not require that he seek permission from the court, rather he may go forth on his own at any time and compel the people to go out, but for a discretionary war he may not bring forth the people except in accordance with the court of seventy one.
Halacha 3ג׳
וּפוֹרֵץ לַעֲשׂוֹת לוֹ דֶּרֶךְ וְאֵין מְמַחִין בְּיָדוֹ. וְדֶרֶךְ הַמֶּלֶךְ אֵין לָהּ שִׁעוּר. אֶלָּא כְּפִי מַה שֶּׁהוּא צָרִיךְ. אֵינוֹ מְעַקֵּם הַדְּרָכִים מִפְּנֵי כַּרְמוֹ שֶׁל זֶה אוֹ מִפְּנֵי שָׂדֵהוּ שֶׁל זֶה. אֶלָּא הוֹלֵךְ בְּשָׁוֶה וְעוֹשֶׂה מִלְחַמְתּוֹ:
And he may break through [property] to make a road and no one can oppose it. And there is no limit to the size of a king's road. Rather, it is according to what he needs. He does not curve the roads because of the vineyard of this [one] or because of the field of that [one], but rather he goes straight and fights his war.
Mishneh Torah, Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0