(9) You shall not oppress a stranger, for you know the feelings of the stranger, having yourselves been strangers in the land of Egypt.
וגר לא תונה ולא תלחצנו (כי גרים הייתם בארץ מצרים) לא תוננו בדברים ולא תלחצנו בממון. שלא יאמר לו, אמש היית עובד לבל קורס נבו, והרי חזירים בין שניך, ואתה מדבר מלין כנגדי. ומנין שאם הוניתו, שהוא יכול להונך, תלמוד לומר (וגר לא תונה) [כי גרים הייתם בארץ מצרים]. מכאן היה רבי נתן אומר, מום שבך אל תאמר לחברך. חביבין הגרים (שבכל מקום) הוא מזהיר עליהם. וגר לא תונה, ואהבתם את הגר (דברים י). ואתם ידעתם את נפש הגר (שמות כג).
(Exodus 22:20) "And a stranger you shall not afflict and you shall not oppress him": You shall not afflict him with words and you shall not oppress him in money matters. Do not say to him: "Yesterday you worshipped the deity of Nevo, and (the flesh of) swine is still between your teeth, and you would dare contend with me!" And whence is it derived that if you taunt him he can taunt you in return? From "And a stranger you shall not afflict … for you were strangers in the land of Egypt" — whence R. Nathan derived "Do not attribute a blemish of your own to your neighbor." Beloved are the strangers, for in many places you are exhorted concerning them: "And a stranger you shall not afflict", (Devarim 10:19) "And you shall love the stranger", (Exodus 23:9) "And you have known the soul of the stranger."
(ז) רַבִּי תַּנְחוּמָא בְּשֵׁם רַבִּי אֶלְעָזָר וְרַבִּי מְנַחֵם בְּשֵׁם רַב אָמַר כָּל הָאֻמָנִיּוֹת אָדָם הָרִאשׁוֹן לְמָדָם, מַאי טַעְמֵיהּ (ישעיה מד, יא): וְחָרָשִׁים הֵמָּה מֵאָדָם, מֵאָדָם הָרִאשׁוֹן. רַבָּנָן אָמְרִין אֲפִלּוּ סִרְגּוּלוֹ שֶׁל סֵפֶר, אָדָם הָרִאשׁוֹן לְמָדוֹ, שֶׁנֶּאֱמַר (בראשית ה, א): זֶה סֵפֶר, הוּא וְסִרְגּוּלוֹ. (בראשית ה, א): בְּיוֹם בְּרֹא אֱלֹהִים אָדָם, הָדָא מְסַיְּעָא לְהַהִיא דְּאָמַר רַבִּי אֶלְעָזָר בֶּן עֲזַרְיָה שָׁלשׁ פְּלָאִים נַעֲשׂוּ בְּאוֹתוֹ הַיּוֹם, בּוֹ בַּיּוֹם נִבְרְאוּ, בּוֹ בַּיּוֹם שִׁמְשׁוּ, בּוֹ בַּיּוֹם הוֹצִיאוּ תּוֹלָדוֹת. בֶּן עֲזַאי אוֹמֵר זֶה סֵפֶר תּוֹלְדֹת אָדָם, זֶה כְּלַל גָּדוֹל בַּתּוֹרָה, רַבִּי עֲקִיבָא אוֹמֵר (ויקרא יט, יח): וְאָהַבְתָּ לְרֵעֲךָ כָּמוֹךָ, זֶה כְּלַל גָּדוֹל בַּתּוֹרָה, שֶׁלֹא תֹאמַר הוֹאִיל וְנִתְבַּזֵּיתִי יִתְבַּזֶה חֲבֵרִי עִמִּי, הוֹאִיל וְנִתְקַלַּלְתִּי יִתְקַלֵּל חֲבֵרִי עִמִּי. אָמַר רַבִּי תַּנְחוּמָא אִם עָשִׂיתָ כֵּן דַּע לְמִי אַתָּה מְבַזֶּה בִּדְמוּת אֱלֹהִים עָשָׂה אוֹתוֹ.
(7) Rabbi Tanchuma said in the name of Rabbi Eliezer and Rabbi Menachem in the name of Rav said... Ben Azzai said: “These are the generations of Adam" is a great principle in the Torah. Rabbi Akiva said: This is a great principle of the Torah: "You shall love your neighbor as yourself" (Lev. 19:18). Thus, one should not say, “Since I am scorned, I should scorn my fellow as well; since I have been cursed, I will curse my fellow as well.” Rabbi Tanchumah said, if you act thus, realize who it is that you are willing to have humiliated - "the one who was made in the likeness of God." Rabbi Tanchuma says, “If you do so, you should know who are you scorning — ‘in the likeness of God He created him.’”
(יח) ואוהב גר. וכיון שכן ואהבתם את הגר, וכן כתוב במקום אחר (ויקרא יט) ואהבת לו כמוך.
And [God] loves the stranger. And therefore you must love the stranger; thus it is written in [Leviticus]: 'you shall love [your neighbor] as your self.'