בְּעֵת שֶׁיֵּשֵׁב הַמֶּלֶךְ עַל כִּסֵּא מַלְכוּתוֹ כּוֹתֵב לוֹ סֵפֶר תּוֹרָה לְעַצְמוֹ יֶתֶר עַל הַסֵּפֶר שֶׁהִנִּיחוּ לוֹ אֲבוֹתָיו. וּמַגִּיהוֹ מִסֵּפֶר הָעֲזָרָה עַל פִּי בֵּית דִּין שֶׁל שִׁבְעִים וְאֶחָד. אִם לֹא הִנִּיחוּ לוֹ אֲבוֹתָיו אוֹ שֶׁנֶּאֱבַד כּוֹתֵב שְׁנֵי סִפְרֵי תּוֹרָה. אֶחָד מַנִּיחוֹ בְּבֵית גְּנָזָיו שֶׁהוּא מְצֻוֶּה בּוֹ כְּכָל אֶחָד מִיִּשְׂרָאֵל. וְהַשֵּׁנִי לֹא יָזוּז מִלְּפָנָיו אֶלָּא בְּעֵת שֶׁיִּכָּנֵס לְבֵית הַכִּסֵּא. אוֹ לְבֵית הַמֶּרְחָץ. אוֹ לְמָקוֹם שֶׁאֵין רָאוּי לִקְרִיאָה. יוֹצֵא לַמִּלְחָמָה וְהוּא עִמּוֹ. נִכְנָס וְהוּא עִמּוֹ. יוֹשֵׁב בַּדִּין וְהוּא עִמּוֹ. מֵסֵב וְהוּא כְּנֶגְדּוֹ שֶׁנֶּאֱמַר (דברים יז יט) "וְהָיְתָה עִמּוֹ וְקָרָא בוֹ כָּל יְמֵי חַיָּיו":
During a king's reign, he must write a Torah scroll for himself in addition to the scroll which was left to him by his ancestors. A court of 71 elders should check this scroll by comparing it to the Torah scroll kept in the Temple Courtyard. If his ancestors did not leave him a Torah scroll or that scroll was lost, he must write two Torah scrolls: one, in whose writing, he is obligated as is every individual Israelite, and which he places in his treasury; the second, which should not move from his presence except when he enters a lavatory, the baths, or other places in which it is not fit to read the words of Torah. When he goes to war, this scroll should accompany him. When he returns, it should accompany him. When he sits in judgement, it should be with him. When he dines, it should be opposite him, as Deuteronomy 17:19 states: 'It should accompany him and he should read it all the days of his life.'
