Torture
גמ׳ ת"ר מניין לרודף אחר חבירו להרגו שניתן להצילו בנפשו ת"ל (ויקרא יט, טז) לא תעמוד על דם רעך והא להכי הוא דאתא האי מיבעי ליה לכדתניא מניין לרואה את חבירו שהוא טובע בנהר או חיה גוררתו או לסטין באין עליו שהוא חייב להצילו ת"ל לא תעמוד על דם רעך אין ה"נ
GEMARA: The Sages taught in a baraita: From where is it derived that with regard to one who pursues another in order to kill him, the pursued party may be saved at the cost of the pursuer’s life? The verse states: “You shall not stand idly by the blood of another” (Leviticus 19:16); rather, you must save him from death. The Gemara asks: But does this verse really come to teach us this? This verse is required for that which is taught in a baraita: From where is it derived that one who sees another drowning in a river, or being dragged away by a wild animal, or being attacked by bandits [listin], is obligated to save him? The Torah states: “You shall not stand idly by the blood of another.” The Gemara answers: Yes, it is indeed so that this verse relates to the obligation to save one whose life is in danger.

תני סיעות בני אדם שהיו מהלכין בדרך פגעו להן גוים ואמרו תנו לנו אחד מכם ונהרוג אותו ואם לאו הרי אנו הורגים את כולכם אפי' כולן נהרגים לא ימסרו נפש אחת מישראל ייחדו להן אחד כגון שבע בן בכרי ימסרו אותו ואל ייהרגו א"ר שמעון בן לקיש והוא שיהא חייב מיתה כשבע בן בכרי ורבי יוחנן אמר אע"פ שאינו חייב מיתה כשבע בן בכרי.

It was taught: If a group of people were traveling and they chanced upon a marauding army which demands of them, "Hand over one of your group, or we will kill all of you," you may not hand anyone over, even though all will end up being killed. If however they specify an individual, you may hand him over, as was the case of Sheva the son of Bichri. Rabbi Shimon ben Laskish says that the case of Sheva the son of Bichri was different since he was liable for the the death penalty. Rabbi Yochanan says that even had he not been liable for the death penalty, [he could have been handed over].

ורבי יוחנן האי וחי אחיך עמך מאי עביד ליה מבעי ליה לכדתניא שנים שהיו מהלכין בדרך וביד אחד מהן קיתון של מים אם שותין שניהם מתים ואם שותה אחד מהן מגיע לישוב דרש בן פטורא מוטב שישתו שניהם וימותו ואל יראה אחד מהם במיתתו של חבירו עד שבא ר' עקיבא ולימד וחי אחיך עמך חייך קודמים לחיי חבירך
The Gemara asks: And Rabbi Yoḥanan, what does he do with this verse: “And your brother shall live with you”? The Gemara answers: He requires the verse for that which is taught in a baraita: If two people were walking on a desolate path and there was a jug [kiton] of water in the possession of one of them, and the situation was such that if both drink from the jug, both will die, as there is not enough water, but if only one of them drinks, he will reach a settled area, there is a dispute as to the halakha. Ben Petora taught: It is preferable that both of them drink and die, and let neither one of them see the death of the other. This was the accepted opinion until Rabbi Akiva came and taught that the verse states: “And your brother shall live with you,” indicating that your life takes precedence over the life of the other.

שו"ת נודע ביהודה מ"ת יו״ד רי

ונשאלו שם חכמי העיר אם מותר לחתוך בגוף המת במקום הזה כדי לראות במופת שורש המכה הזאת כדי להתלמד מזה בהנהגת הרופאים מכאן ולהבא...

אבל בנדון דידן אין כאן שום חולה הצריך לזה רק שרוצים ללמוד חכמה זו אולי יזדמן חולה שיהיה צריך לזה ודאי דלא דחינן משום חששא קלה זו שום איסור תורה או אפילו איסור דרבנן...

וחלילה להתיר דבר זה ואפילו רופאי האומות אינן עושים נסיון בחכמת הניתוח ע"י שום מת כי אם בהרוגים ע"פ משפט או במי שהסכים בעצמו בחייו לכך ואם אנו ח"ו מקילים בדבר זה א"כ ינתחו כל המתים כדי ללמוד סידור אברים הפנימים ומהותן כדי שידעו לעשות רפואות להחיים.

Responsa Noda Bi-Yehuda YD 210

The scholars of the city were asked if it is permissible to dissect the body of the dead in this place in order to see the source of the wound, in order to derive knowledge for the behavior of doctors from now on...

But in this case, there is no patient who needs this. It is just that we want to acquire this knowledge, in the case that a patient appears before us who needs this. For this purpose we do not push off due to this small likelihood any biblical or rabbinic prohibition.

It is forbidden to permit this matter; even the gentile physicians do not perform experiments with dissection upon any corpse, with the exception of those killed by the law, or with one who agreed to this during his lifetime. If we heaven forbid are lenient in this matter, they will come to dissect all corpses in order to learn the arrangement of the inner limbs and their natures, so that they will know how to cure the living.

דלמא מלקות חמור דאמר רב אילמלי נגדוה לחנניה מישאל ועזריה פלחו לצלמא א"ל רב סמא בריה דרב אסי לרב אשי ואמרי לה רב סמא בריה דרב אשי לרב אשי ולא שני לך בין הכאה שיש לה קצבה להכאה שאין לה קצבה
Perhaps the punishment of lashes is more severe, as Rav said: Had they flogged Hananiah, Mishael, and Azariah (see Daniel, chapter 3) instead of casting them into the fiery furnace, these three would have been induced to worship the graven image. Apparently, the punishment of lashes is more severe than death. Rav Samma, son of Rav Asi, said to Rav Ashi, and some say Rav Samma, son of Rav Ashi, said to Rav Ashi: And is there no difference to you between flogging that has a limit, e.g., forty lashes by Torah law, which is a less severe punishment, and flogging that does not have a limit, i.e., flogging administered to induce compliance, which is more severe?
מִי שֶׁהַדִּין נוֹתֵן שֶׁכּוֹפִין אוֹתוֹ לְגָרֵשׁ אֶת אִשְׁתּוֹ וְלֹא רָצָה לְגָרֵשׁ. בֵּית דִּין שֶׁל יִשְׂרָאֵל בְּכָל מָקוֹם וּבְכָל זְמַן מַכִּין אוֹתוֹ עַד שֶׁיֹּאמַר רוֹצֶה אֲנִי וְיִכְתֹּב הַגֵּט וְהוּא גֵּט כָּשֵׁר. וְכֵן אִם הִכּוּהוּ עַכּוּ''ם וְאָמְרוּ לוֹ עֲשֵׂה מַה שֶּׁיִּשְׂרָאֵל אוֹמְרִין לְךָ וְלָחֲצוּ אוֹתוֹ יִשְׂרָאֵל בְּיַד הָעַכּוּ''ם עַד שֶׁיְּגָרֵשׁ הֲרֵי זֶה כָּשֵׁר. וְאִם הָעַכּוּ''ם מֵעַצְמָן אֲנָסוּהוּ עַד שֶׁכָּתַב הוֹאִיל וְהַדִּין נוֹתֵן שֶׁיִּכְתֹּב הֲרֵי זֶה גֵּט פָּסוּל. וְלָמָּה לֹא בִּטֵּל גֵּט זֶה שֶׁהֲרֵי הוּא אָנוּס בֵּין בְּיַד עַכּוּ''ם בֵּין בְּיַד יִשְׂרָאֵל. שֶׁאֵין אוֹמְרִין אָנוּס אֶלָּא לְמִי שֶׁנִּלְחַץ וְנִדְחַק לַעֲשׂוֹת דָּבָר שֶׁאֵינוֹ מְחֻיָּב בּוֹ מִן הַתּוֹרָה לַעֲשׂוֹתוֹ כְּגוֹן מִי שֶׁהֻכָּה עַד שֶׁמָּכַר אוֹ עַד שֶׁנָּתַן. אֲבָל מִי שֶׁתְּקָפוֹ יִצְרוֹ הָרַע לְבַטֵּל מִצְוָה אוֹ לַעֲשׂוֹת עֲבֵרָה וְהֻכָּה עַד שֶׁעָשָׂה דָּבָר שֶׁחַיָּב לַעֲשׂוֹתוֹ אוֹ עַד שֶׁנִּתְרַחֵק מִדָּבָר הָאָסוּר לַעֲשׂוֹתוֹ אֵין זֶה אָנוּס מִמֶּנּוּ אֶלָּא הוּא אָנַס עַצְמוֹ בְּדַעְתּוֹ הָרָעָה. לְפִיכָךְ זֶה שֶׁאֵינוֹ רוֹצֶה לְגָרֵשׁ מֵאַחַר שֶׁהוּא רוֹצֶה לִהְיוֹת מִיִּשְׂרָאֵל וְרוֹצֶה הוּא לַעֲשׂוֹת כָּל הַמִּצְוֹת וּלְהִתְרַחֵק מִן הָעֲבֵרוֹת וְיִצְרוֹ הוּא שֶׁתְּקָפוֹ וְכֵיוָן שֶׁהֻכָּה עַד שֶׁתָּשַׁשׁ יִצְרוֹ וְאָמַר רוֹצֶה אֲנִי כְּבָר גֵּרֵשׁ לִרְצוֹנוֹ. לֹא הָיָה הַדִּין נוֹתֵן שֶׁכּוֹפִין אוֹתוֹ לְגָרֵשׁ וְטָעוּ בֵּית דִּין שֶׁל יִשְׂרָאֵל אוֹ שֶׁהָיוּ הֶדְיוֹטוֹת וַאֲנָסוּהוּ עַד שֶׁגֵּרֵשׁ הֲרֵי זֶה גֵּט פָּסוּל הוֹאִיל וְיִשְׂרָאֵל אֲנָסוּהוּ יִגְמֹר וִיגָרֵשׁ. וְאִם הָעַכּוּ''ם, אֲנָסוּהוּ לְגָרֵשׁ שֶׁלֹּא כַּדִּין אֵינוֹ גֵּט. אַף עַל פִּי שֶׁאָמַר בְּעַכּוּ''ם רוֹצֶה אֲנִי וְאָמַר לְיִשְׂרָאֵל כִּתְבוּ וְחִתְמוּ הוֹאִיל וְאֵין הַדִּין מְחַיְּבוֹ לְהוֹצִיא וְהָעַכּוּ''ם אֲנָסוּהוּ אֵינוֹ גֵּט:
If the law requires that a man should be compelled to divorce his wife and he refuses to do so, the Jewish court anywhere, at any time, should lash him until he says I am willing; then he should write the get, and it will be valid.— — So too, if non-Jews flogged him, saying to him: "Do what the Jews are telling you," and if pressure is exerted on him by Jews through non-Jews until he gives his divorce, it is a valid get.— — Why is this get not nullified, seeing that he is compelled by non-Jews or by Jews? The rule concerning a person who has committed a misdeed under compulsion applies only to one who has been pressured to do a thing to which he is not biblically bound.— —
בשעה שהוציאו את רבי עקיבא להריגה זמן קריאת שמע היה והיו סורקים את בשרו במסרקות של ברזל והיה מקבל עליו עול מלכות שמים אמרו לו תלמידיו רבינו עד כאן אמר להם כל ימי הייתי מצטער על פסוק זה בכל נפשך אפילו נוטל את נשמתך אמרתי מתי יבא לידי ואקיימנו ועכשיו שבא לידי לא אקיימנו היה מאריך באחד עד שיצתה נשמתו באחד יצתה בת קול ואמרה אשריך רבי עקיבא שיצאה נשמתך באחד
The Gemara relates: When they took Rabbi Akiva out to be executed, it was time for the recitation of Shema. And they were raking his flesh with iron combs, and he was reciting Shema, thereby accepting upon himself the yoke of Heaven. His students said to him: Our teacher, even now, as you suffer, you recite Shema? He said to them: All my days I have been troubled by the verse: With all your soul, meaning: Even if God takes your soul. I said to myself: When will the opportunity be afforded me to fulfill this verse? Now that it has been afforded me, shall I not fulfill it? He prolonged his uttering of the word: One, until his soul left his body as he uttered his final word: One. A voice descended from heaven and said: Happy are you, Rabbi Akiva, that your soul left your body as you uttered: One.
גמ׳ אמר רבא מאי טעמא דמחתרת חזקה אין אדם מעמיד עצמו על ממונו והאי מימר אמר אי אזילנא קאי לאפאי ולא שביק לי ואי קאי לאפאי קטילנא ליה והתורה אמרה אם בא להורגך השכם להורגו
GEMARA: Rava says: What is the reason for this halakha concerning a burglar who breaks into a house? He explains: There is a presumption that a person does not restrain himself when faced with losing his money, and therefore this burglar must have said to himself: If I go in and the owner sees me, he will rise against me and not allow me to steal from him, and if he rises against me, I will kill him. And the Torah stated a principle: If someone comes to kill you, rise and kill him first.