(יז) שָׁמ֣וֹר תִּשְׁמְר֔וּן אֶת־מִצְוֺ֖ת יְהֹוָ֣ה אֱלֹהֵיכֶ֑ם וְעֵדֹתָ֥יו וְחֻקָּ֖יו אֲשֶׁ֥ר צִוָּֽךְ׃ (יח) וְעָשִׂ֛יתָ הַיָּשָׁ֥ר וְהַטּ֖וֹב בְּעֵינֵ֣י יְהֹוָ֑ה לְמַ֙עַן֙ יִ֣יטַב לָ֔ךְ וּבָ֗אתָ וְיָֽרַשְׁתָּ֙ אֶת־הָאָ֣רֶץ הַטֹּבָ֔ה אֲשֶׁר־נִשְׁבַּ֥ע יְהֹוָ֖ה לַאֲבֹתֶֽיךָ׃
(17) Be sure to keep the commandments, decrees, and laws that the LORD your God has enjoined upon you. (18) Do what is right and good in the sight of the LORD, that it may go well with you and that you may be able to possess the good land that the LORD your God promised on oath to your fathers,
(ד) וְעֹ֥ז מֶלֶךְ֮ מִשְׁפָּ֢ט אָ֫הֵ֥ב אַ֭תָּה כּוֹנַ֣נְתָּ מֵישָׁרִ֑ים מִשְׁפָּ֥ט וּ֝צְדָקָ֗ה בְּיַעֲקֹ֤ב ׀ אַתָּ֬ה עָשִֽׂיתָ׃
(4) Mighty king-b who loves justice,
it was You who established equity,
You who worked righteous judgment in Jacob.
(טז) אֵ֥לֶּה הַדְּבָרִ֖ים אֲשֶׁ֣ר תַּֽעֲשׂ֑וּ דַּבְּר֤וּ אֱמֶת֙ אִ֣ישׁ אֶת־רֵעֵ֔הוּ אֱמֶת֙ וּמִשְׁפַּ֣ט שָׁל֔וֹם שִׁפְט֖וּ בְּשַׁעֲרֵיכֶֽם׃
(16) These are the things you are to do: Speak the truth to one another, render true and perfect justice in your gates.
אלא יקוב הדין את ההר שנאמר (דברים א, יז) כי המשפט לאלהים הוא וכן משה היה אומר יקוב הדין את ההר אבל אהרן אוהב שלום ורודף שלום ומשים שלום בין אדם לחבירו שנאמר (מלאכי ב, ו) תורת אמת היתה בפיהו ועולה לא נמצא בשפתיו בשלום ובמישור הלך אתי ורבים השיב מעון
Rather, the judge must assure that the true judgment will prevail at all costs and metaphorically pierce the mountain, as it is stated: “For the judgment is God’s” (Deuteronomy 1:17). And similarly, Moses would say: Let the judgment pierce the mountain. But by contrast, Aaron, whose role was not that of a judge, was a lover of peace and a pursuer of peace, and he would apply peace between one person and the other, as it is stated: “The law of truth was in his mouth, and unrighteousness was not found in his lips; he walked with Me in peace and uprightness, and turned many away from iniquity” (Malachi 2:6).
וכן בדוד הוא אומר (שמואל ב ח, טו) ויהי דוד עושה משפט וצדקה והלא כל מקום שיש משפט אין צדקה וצדקה אין משפט אלא איזהו משפט שיש בו צדקה הוי אומר זה ביצוע
And similarly, with regard to David, it says: “And David executed justice and charity to all his people” (II Samuel 8:15). And is it not that wherever there is strict justice, there is no charity, and wherever there is charity, there is no strict justice? Rather, which is the justice that has within it charity? You must say: This is mediation.
כדתניא צדק צדק תרדף אחד לדין ואחד לפשרה כיצד שתי ספינות עוברות בנהר ופגעו זה בזה אם עוברות שתיהן שתיהן טובעות בזה אחר זה שתיהן עוברות וכן שני גמלים שהיו עולים במעלות בית חורון ופגעו זה בזה אם עלו שניהן שניהן נופלין בזה אחר זה שניהן עולין הא כיצד טעונה ושאינה טעונה תידחה שאינה טעונה מפני טעונה קרובה ושאינה קרובה תידחה קרובה מפני שאינה קרובה היו שתיהן קרובות שתיהן רחוקות הטל פשרה ביניהן ומעלות שכר זו לזו
As it is taught in a baraita: When the verse states: “Justice, justice, shall you follow,” one mention of “justice” is stated with regard to judgment and one is stated with regard to compromise. How so? Where there are two boats traveling on the river and they encounter each other, if both of them attempt to pass, both of them sink, as the river is not wide enough for both to pass. If they pass one after the other, both of them pass. And similarly, where there are two camels who were ascending the ascent of Beit Ḥoron, where there is a narrow steep path, and they encounter each other, if both of them attempt to ascend, both of them fall. If they ascend one after the other, both of them ascend. How does one decide which of them should go first? If there is one boat that is laden and one boat that is not laden, the needs of the one that is not laden should be overridden due to the needs of the one that is laden. If there is one boat that is close to its destination and one boat that is not close to its destination, the needs of the one that is close should be overridden due to the needs of the one that is not close. If both of them were close to their destinations, or both of them were far from their destinations, impose a compromise between them to decide which goes first, and the owners of the boats pay a fee to one other, i.e., the owners of the first boat compensate the owner of the boat that waits, for any loss incurred.
אָמַר רַב הַמְנוּנָא: מַאי דִּכְתִיב ״מִי כְּהֶחָכָם וּמִי יוֹדֵעַ פֵּשֶׁר דָּבָר״ — מִי כְּהַקָּדוֹשׁ בָּרוּךְ הוּא שֶׁיּוֹדֵעַ לַעֲשׂוֹת פְּשָׁרָה בֵּין שְׁנֵי צַדִּיקִים, בֵּין חִזְקִיָּהוּ לִישַׁעְיָהוּ. חִזְקִיָּהוּ אֲמַר: לֵיתֵי יְשַׁעְיָהוּ גַּבַּאי, דְּהָכִי אַשְׁכְּחַן בְּאֵלִיָּהוּ דַּאֲזַל לְגַבֵּי אַחְאָב, שֶׁנֶּאֱמַר: ״וַיֵּלֶךְ אֵלִיָּהוּ לְהֵרָאוֹת אֶל אַחְאָב״. יְשַׁעְיָהוּ אֲמַר: לֵיתֵי חִזְקִיָּהוּ גַּבַּאי דְּהָכִי אַשְׁכְּחַן בִּיהוֹרָם בֶּן אַחְאָב דַּאֲזַל לְגַבֵּי אֱלִישָׁע.
With regard to redemption and prayer, the Gemara tells the story of Hezekiah’s illness, his prayer to God, and subsequent recuperation. Rav Hamnuna said: What is the meaning of that which is written praising the Holy One, Blessed be He: “Who is like the wise man, and who knows the interpretation [pesher] of the matter” (Ecclesiastes 8:1)? This verse means: Who is like the Holy One, Blessed be He, Who knows how to effect compromise [peshara] between two righteous individuals, between Hezekiah, the king of Judea, and Isaiah the prophet. They disagreed over which of them should visit the other. Hezekiah said: Let Isaiah come to me, as that is what we find with regard to Elijah the prophet, who went to Ahab, the king of Israel, as it is stated: “And Elijah went to appear to Ahab” (I Kings 18:2). This proves that it is the prophet who must seek out the king. And Isaiah said: Let Hezekiah come to me, as that is what we find with regard to Yehoram ben Ahab, king of Israel, who went to Elisha the prophet, as it is stated: “So the king of Israel, Jehosaphat and the king of Edom went down to him” (II Kings 3:12).

(י) אַרְבַּע מִדּוֹת בָּאָדָם. הָאוֹמֵר שֶׁלִּי שֶׁלִּי וְשֶׁלְּךָ שֶׁלָּךְ, זוֹ מִדָּה בֵינוֹנִית. וְיֵשׁ אוֹמְרִים, זוֹ מִדַּת סְדוֹם. שֶׁלִּי שֶׁלְּךָ וְשֶׁלְּךָ שֶׁלִּי, עַם הָאָרֶץ. שֶׁלִּי שֶׁלְּךָ וְשֶׁלְּךָ שֶׁלָּךְ, חָסִיד. שֶׁלִּי שֶׁלִּי וְשֶׁלְּךָ שֶׁלִּי, רָשָׁע:

(10) There are four types of character in human beings: One that says: “mine is mine, and yours is yours”: this is a commonplace type; and some say this is a sodom-type of character. [One that says:] “mine is yours and yours is mine”: is an unlearned person (am haaretz); [One that says:] “mine is yours and yours is yours” is a pious person. [One that says:] “mine is mine, and yours is mine” is a wicked person.

אשר יעשון זו לפנים משורת הדין דאמר ר' יוחנן לא חרבה ירושלים אלא על שדנו בה דין תורה אלא דיני דמגיזתא לדיינו אלא אימא שהעמידו דיניהם על דין תורה ולא עבדו לפנים משורת הדין:
It was taught in the baraita: “That they must perform”; that is referring to acting beyond the letter of the law, as Rabbi Yoḥanan says: Jerusalem was destroyed only for the fact that they adjudicated cases on the basis of Torah law in the city. The Gemara asks: Rather, what else should they have done? Should they rather have adjudicated cases on the basis of arbitrary decisions [demagizeta]? Rather, say: That they established their rulings on the basis of Torah law and did not go beyond the letter of the law.

(ה) וְגַ֨ם־לְל֔וֹט הַהֹלֵ֖ךְ אֶת־אַבְרָ֑ם הָיָ֥ה צֹאן־וּבָקָ֖ר וְאֹהָלִֽים׃ (ו) וְלֹא־נָשָׂ֥א אֹתָ֛ם הָאָ֖רֶץ לָשֶׁ֣בֶת יַחְדָּ֑ו כִּֽי־הָיָ֤ה רְכוּשָׁם֙ רָ֔ב וְלֹ֥א יָֽכְל֖וּ לָשֶׁ֥בֶת יַחְדָּֽו׃ (ז) וַֽיְהִי־רִ֗יב בֵּ֚ין רֹעֵ֣י מִקְנֵֽה־אַבְרָ֔ם וּבֵ֖ין רֹעֵ֣י מִקְנֵה־ל֑וֹט וְהַֽכְּנַעֲנִי֙ וְהַפְּרִזִּ֔י אָ֖ז יֹשֵׁ֥ב בָּאָֽרֶץ׃ (ח) וַיֹּ֨אמֶר אַבְרָ֜ם אֶל־ל֗וֹט אַל־נָ֨א תְהִ֤י מְרִיבָה֙ בֵּינִ֣י וּבֵינֶ֔ךָ וּבֵ֥ין רֹעַ֖י וּבֵ֣ין רֹעֶ֑יךָ כִּֽי־אֲנָשִׁ֥ים אַחִ֖ים אֲנָֽחְנוּ׃ (ט) הֲלֹ֤א כׇל־הָאָ֙רֶץ֙ לְפָנֶ֔יךָ הִפָּ֥רֶד נָ֖א מֵעָלָ֑י אִם־הַשְּׂמֹ֣אל וְאֵימִ֔נָה וְאִם־הַיָּמִ֖ין וְאַשְׂמְאִֽילָה׃ (י) וַיִּשָּׂא־ל֣וֹט אֶת־עֵינָ֗יו וַיַּרְא֙ אֶת־כׇּל־כִּכַּ֣ר הַיַּרְדֵּ֔ן כִּ֥י כֻלָּ֖הּ מַשְׁקֶ֑ה לִפְנֵ֣י ׀ שַׁחֵ֣ת יְהֹוָ֗ה אֶת־סְדֹם֙ וְאֶת־עֲמֹרָ֔ה כְּגַן־יְהֹוָה֙ כְּאֶ֣רֶץ מִצְרַ֔יִם בֹּאֲכָ֖ה צֹֽעַר׃ (יא) וַיִּבְחַר־ל֣וֹ ל֗וֹט אֵ֚ת כׇּל־כִּכַּ֣ר הַיַּרְדֵּ֔ן וַיִּסַּ֥ע ל֖וֹט מִקֶּ֑דֶם וַיִּפָּ֣רְד֔וּ אִ֖ישׁ מֵעַ֥ל אָחִֽיו׃ (יב) אַבְרָ֖ם יָשַׁ֣ב בְּאֶֽרֶץ־כְּנָ֑עַן וְל֗וֹט יָשַׁב֙ בְּעָרֵ֣י הַכִּכָּ֔ר וַיֶּאֱהַ֖ל עַד־סְדֹֽם׃

(5) Lot, who went with Abram, also had flocks and herds and tents, (6) so that the land could not support them staying together; for their possessions were so great that they could not remain together. (7) And there was quarreling between the herdsmen of Abram’s cattle and those of Lot’s cattle.—The Canaanites and Perizzites were then dwelling in the land.— (8) Abram said to Lot, “Let there be no strife between you and me, between my herdsmen and yours, for we are kinsmen. (9) Is not the whole land before you? Let us separate: if you go north, I will go south; and if you go south, I will go north.” (10) Lot looked about him and saw how well watered was the whole plain of the Jordan, all of it—this was before the LORD had destroyed Sodom and Gomorrah—all the way to Zoar, like the garden of the LORD, like the land of Egypt. (11) So Lot chose for himself the whole plain of the Jordan, and Lot journeyed eastward. Thus they parted from each other; (12) Abram remained in the land of Canaan, while Lot settled in the cities of the Plain, pitching his tents near Sodom.
(כו) וַיֹּ֥אמֶר יְהוּדָ֖ה אֶל־אֶחָ֑יו מַה־בֶּ֗צַע כִּ֤י נַהֲרֹג֙ אֶת־אָחִ֔ינוּ וְכִסִּ֖ינוּ אֶת־דָּמֽוֹ׃ (כז) לְכ֞וּ וְנִמְכְּרֶ֣נּוּ לַיִּשְׁמְעֵאלִ֗ים וְיָדֵ֙נוּ֙ אַל־תְּהִי־ב֔וֹ כִּֽי־אָחִ֥ינוּ בְשָׂרֵ֖נוּ ה֑וּא וַֽיִּשְׁמְע֖וּ אֶחָֽיו׃ (כח) וַיַּֽעַבְרוּ֩ אֲנָשִׁ֨ים מִדְיָנִ֜ים סֹֽחֲרִ֗ים וַֽיִּמְשְׁכוּ֙ וַיַּֽעֲל֤וּ אֶת־יוֹסֵף֙ מִן־הַבּ֔וֹר וַיִּמְכְּר֧וּ אֶת־יוֹסֵ֛ף לַיִּשְׁמְעֵאלִ֖ים בְּעֶשְׂרִ֣ים כָּ֑סֶף וַיָּבִ֥יאוּ אֶת־יוֹסֵ֖ף מִצְרָֽיְמָה׃
(26) Then Judah said to his brothers, “What do we gain by killing our brother and covering up his blood? (27) Come, let us sell him to the Ishmaelites, but let us not do away with him ourselves. After all, he is our brother, our own flesh.” His brothers agreed. (28) When Midianite traders passed by, they pulled Joseph up out of the pit. They sold Joseph for twenty pieces of silver to the Ishmaelites, who brought Joseph to Egypt.