14כְּשֵׁם שֶׁאָדָם מְצֻוֶּה עַל שְׁבִיתַת בְּהֶמְתּוֹ בְּשַׁבָּת כָּךְ הוּא מְצֻוֶּה עַל שְׁבִיתַת עַבְדּוֹ וַאֲמָתוֹ וְאַף עַל פִּי שֶׁהֵן בְּנֵי דַּעַת וּלְדַעַת עַצְמָן עוֹשִׂין מִצְוָה עָלֵינוּ לְשָׁמְרָן וּלְמָנְעָן מֵעֲשִׂיַּת מְלָאכָה בְּשַׁבָּת שֶׁנֶּאֱמַר (שמות כג יב) "לְמַעַן יָנוּחַ שׁוֹרְךָ וַחֲמֹרֶךָ וְיִנָּפֵשׁ בֶּן אֲמָתְךָ וְהַגֵּר". עֶבֶד וְאָמָה שֶׁאָנוּ מְצֻוִּין עַל שְׁבִיתָתָן הֵם עֲבָדִים שֶׁמָּלוּ וְטָבְלוּ לְשֵׁם עַבְדוּת וְקִבְּלוּ מִצְוֹת שֶׁהָעֲבָדִים חַיָּבִין בָּהֶן. אֲבָל עֲבָדִים שֶׁלֹּא מָלוּ וְלֹא טָבְלוּ אֶלָּא קִבְּלוּ עֲלֵיהֶן שֶׁבַע מִצְוֹת שֶׁנִּצְטַוּוּ בְּנֵי נֹחַ בִּלְבַד הֲרֵי הֵן כְּגֵר תּוֹשָׁב וּמֻתָּרִין לַעֲשׂוֹת מְלָאכָה בְּשַׁבָּת לְעַצְמָן בְּפַרְהֶסְיָא כְּיִשְׂרָאֵל בְּחל. וְאֵין מְקַבְּלִין גֵּר תּוֹשָׁב אֶלָּא בִּזְמַן שֶׁהַיּוֹבֵל נוֹהֵג. הוֹאִיל וְגֵר תּוֹשָׁב עוֹשֶׂה מְלָאכָה לְעַצְמוֹ בְּשַׁבָּת וְגֵר צֶדֶק הֲרֵי הוּא כְּיִשְׂרָאֵל לְכָל דָּבָר. בְּמִי נֶאֱמַר וְיִנָּפֵשׁ בֶּן אֲמָתְךָ וְהַגֵּר. זֶה גֵּר תּוֹשָׁב שֶׁהוּא לְקִיטוֹ וּשְׂכִירוֹ שֶׁל יִשְׂרָאֵל כְּמוֹ בֶּן אֲמָתוֹ. שֶׁלֹּא יַעֲשֶׂה מְלָאכָה לְיִשְׂרָאֵל רַבּוֹ בְּשַׁבָּת אֲבָל לְעַצְמוֹ עוֹשֶׂה. וַאֲפִלּוּ הָיָה הַגֵּר זֶה עַבְדּוֹ הֲרֵי זֶה עוֹשֶׂה לְעַצְמוֹ:
Just as a person is commanded that his animals rest on the Sabbath, so too, he is commanded that his servants and maidservants rest. Although they have the power of thought, and act according to their own volition, [their master] is obligated to watch over them and prevent them from performing [forbidden] labor on the Sabbath, as [Exodus 23:12] states: "Thus your ox and your donkey may rest, and the son of your maidservant and the foreigner may find repose." The servants and maidservants whom we are commanded to have rest [on the Sabbath] are servants that have been circumcised and have immersed themselves [in the mikveh], so that they be granted the status of servants who have accepted the mitzvot that servants are obligated to observe. By contrast, servants who have not been circumcised and have not immersed themselves, but have merely accepted [the observance of] the seven [universal] laws commanded to the descendants of Noach, are considered equivalent to "resident aliens" and are permitted to perform [forbidden] labors for their own sake in public as the Jews may during the week. [The status of] a resident alien is granted only in the era when the Jubilee year is observed. [One might ask:] Since a resident alien may perform [forbidden] labors on his own behalf on the Sabbath, and a convert is considered equivalent to a native-born Jew in all matters, who is referred to with [the term הגר] in the phrase, "and the son of your maidservant and the foreigner [הגר] may find repose"? This refers to a resident alien who is an employee of a Jew, like "the son of [his] maidservant." Such a resident alien may not perform [forbidden] labors on behalf of his Jewish master on the Sabbath.He may, however, perform [such labors] on his own behalf. Moreover, even if this foreigner is a servant [belonging to a Jewish master], [this foreigner] may perform [labors] for his own sake [on the Sabbath].