Billam and His Donkey
(כח) וַיִּפְתַּ֥ח יְהוָ֖ה אֶת־פִּ֣י הָאָת֑וֹן וַתֹּ֤אמֶר לְבִלְעָם֙ מֶה־עָשִׂ֣יתִֽי לְךָ֔ כִּ֣י הִכִּיתַ֔נִי זֶ֖ה שָׁלֹ֥שׁ רְגָלִֽים׃ (כט) וַיֹּ֤אמֶר בִּלְעָם֙ לָֽאָת֔וֹן כִּ֥י הִתְעַלַּ֖לְתְּ בִּ֑י ל֤וּ יֶשׁ־חֶ֙רֶב֙ בְּיָדִ֔י כִּ֥י עַתָּ֖ה הֲרַגְתִּֽיךְ׃ (ל) וַתֹּ֨אמֶר הָאָת֜וֹן אֶל־בִּלְעָ֗ם הֲלוֹא֩ אָנֹכִ֨י אֲתֹֽנְךָ֜ אֲשֶׁר־רָכַ֣בְתָּ עָלַ֗י מֵעֽוֹדְךָ֙ עַד־הַיּ֣וֹם הַזֶּ֔ה הַֽהַסְכֵּ֣ן הִסְכַּ֔נְתִּי לַעֲשׂ֥וֹת לְךָ֖ כֹּ֑ה וַיֹּ֖אמֶר לֹֽא׃
(28) Then the LORD opened the ass’s mouth, and she said to Balaam, “What have I done to you that you have beaten me these three times?” (29) Balaam said to the ass, “You have made a mockery of me! If I had a sword with me, I’d kill you.” (30) The ass said to Balaam, “Look, I am the ass that you have been riding all along until this day! Have I been in the habit of doing thus to you?” And he answered, “No.”
(לב) וַיֹּ֤אמֶר אֵלָיו֙ מַלְאַ֣ךְ יְהוָ֔ה עַל־מָ֗ה הִכִּ֙יתָ֙ אֶת־אֲתֹ֣נְךָ֔ זֶ֖ה שָׁל֣וֹשׁ רְגָלִ֑ים הִנֵּ֤ה אָנֹכִי֙ יָצָ֣אתִי לְשָׂטָ֔ן כִּֽי־יָרַ֥ט הַדֶּ֖רֶךְ לְנֶגְדִּֽי׃ (לג) וַתִּרְאַ֙נִי֙ הָֽאָת֔וֹן וַתֵּ֣ט לְפָנַ֔י זֶ֖ה שָׁלֹ֣שׁ רְגָלִ֑ים אוּלַי֙ נָטְתָ֣ה מִפָּנַ֔י כִּ֥י עַתָּ֛ה גַּם־אֹתְכָ֥ה הָרַ֖גְתִּי וְאוֹתָ֥הּ הֶחֱיֵֽיתִי׃ (לד) וַיֹּ֨אמֶר בִּלְעָ֜ם אֶל־מַלְאַ֤ךְ יְהוָה֙ חָטָ֔אתִי כִּ֚י לֹ֣א יָדַ֔עְתִּי כִּ֥י אַתָּ֛ה נִצָּ֥ב לִקְרָאתִ֖י בַּדָּ֑רֶךְ וְעַתָּ֛ה אִם־רַ֥ע בְּעֵינֶ֖יךָ אָשׁ֥וּבָה לִּֽי׃
(32) The angel of the LORD said to him, “Why have you beaten your ass these three times? It is I who came out as an adversary, for the errand is obnoxious to me. (33) And when the ass saw me, she shied away because of me those three times. If she had not shied away from me, you are the one I should have killed, while sparing her.” (34) Balaam said to the angel of the LORD, “I erred because I did not know that you were standing in my way. If you still disapprove, I will turn back.”
(א) לֹ֥א תִשָּׂ֖א שֵׁ֣מַע שָׁ֑וְא אַל־תָּ֤שֶׁת יָֽדְךָ֙ עִם־רָשָׁ֔ע לִהְיֹ֖ת עֵ֥ד חָמָֽס׃ (ס) (ב) לֹֽא־תִהְיֶ֥ה אַחֲרֵֽי־רַבִּ֖ים לְרָעֹ֑ת וְלֹא־תַעֲנֶ֣ה עַל־רִ֗ב לִנְטֹ֛ת אַחֲרֵ֥י רַבִּ֖ים לְהַטֹּֽת׃ (ג) וְדָ֕ל לֹ֥א תֶהְדַּ֖ר בְּרִיבֽוֹ׃ (ס) (ד) כִּ֣י תִפְגַּ֞ע שׁ֧וֹר אֹֽיִבְךָ֛ א֥וֹ חֲמֹר֖וֹ תֹּעֶ֑ה הָשֵׁ֥ב תְּשִׁיבֶ֖נּוּ לֽוֹ׃ (ס) (ה) כִּֽי־תִרְאֶ֞ה חֲמ֣וֹר שֹׂנַאֲךָ֗ רֹבֵץ֙ תַּ֣חַת מַשָּׂא֔וֹ וְחָדַלְתָּ֖ מֵעֲזֹ֣ב ל֑וֹ עָזֹ֥ב תַּעֲזֹ֖ב עִמּֽוֹ׃ (ס) (ו) לֹ֥א תַטֶּ֛ה מִשְׁפַּ֥ט אֶבְיֹנְךָ֖ בְּרִיבֽוֹ׃ (ז) מִדְּבַר־שֶׁ֖קֶר תִּרְחָ֑ק וְנָקִ֤י וְצַדִּיק֙ אַֽל־תַּהֲרֹ֔ג כִּ֥י לֹא־אַצְדִּ֖יק רָשָֽׁע׃ (ח) וְשֹׁ֖חַד לֹ֣א תִקָּ֑ח כִּ֤י הַשֹּׁ֙חַד֙ יְעַוֵּ֣ר פִּקְחִ֔ים וִֽיסַלֵּ֖ף דִּבְרֵ֥י צַדִּיקִֽים׃ (ט) וְגֵ֖ר לֹ֣א תִלְחָ֑ץ וְאַתֶּ֗ם יְדַעְתֶּם֙ אֶת־נֶ֣פֶשׁ הַגֵּ֔ר כִּֽי־גֵרִ֥ים הֱיִיתֶ֖ם בְּאֶ֥רֶץ מִצְרָֽיִם׃
(1) You must not carry false rumors; you shall not join hands with the guilty to act as a malicious witness: (2) You shall neither side with the mighty to do wrong—you shall not give perverse testimony in a dispute so as to pervert it in favor of the mighty (3) nor shall you show deference to a poor man in his dispute. (4) When you encounter your enemy’s ox or ass wandering, you must take it back to him. (5) When you see the ass of your enemy lying under its burden and would refrain from raising it, you must nevertheless raise it with him. (6) You shall not subvert the rights of your needy in their disputes. (7) Keep far from a false charge; do not bring death on those who are innocent and in the right, for I will not acquit the wrongdoer. (8) Do not take bribes, for bribes blind the clear-sighted and upset the pleas of those who are in the right. (9) You shall not oppress a stranger, for you know the feelings of the stranger, having yourselves been strangers in the land of Egypt.
גמ׳ אמר רב יהודה אמר רב בהמה שנפלה לאמת המים מביא כרים וכסתות ומניח תחתיה ואם עלתה עלתה מיתיבי בהמה שנפלה לאמת המים עושה לה פרנסה במקומה בשביל שלא תמות פרנסה אין כרים וכסתות לא לא קשיא הא דאפשר בפרנסה הא דאי אפשר בפרנסה אפשר בפרנסה אין ואי לא מביא כרים וכסתות ומניח תחתיה והא קא מבטל כלי מהיכנו סבר מבטל כלי מהיכנו דרבנן צער בעלי חיים דאורייתא ואתי דאורייתא ודחי דרבנן:
GEMARA: Rav Yehuda said that Rav said: With regard to an animal that fell into an aqueduct, one brings cushions and blankets, and throws them into the water ditch, and places them beneath the animal in the aqueduct. And if the animal thereby emerges, it emerges. The Gemara raises an objection from a Tosefta: With regard to an animal that fell into an aqueduct on Shabbat, one provides it with sustenance in its place so that it will not die. This implies that providing it with sustenance, yes, that is permitted, providing it with cushions and blankets, no, that it is prohibited. The Gemara answers: This is not difficult, as there is room to distinguish between the cases. This, the Tosefta in which it was taught that one provides the animal with sustenance, is referring to a case where it is possible to provide it with sustenance. That, the mishna in which Rav said that one brings cushions and blankets, is referring to a case where it is impossible to provide it with sustenance. Where it is possible to provide it with sustenance, yes, he does so. And if it is not possible to provide it with sustenance, he brings cushions and blankets and places them beneath the animal. The Gemara asks: Does he not, by placing the cushions and blankets, negate a vessel’s preparedness? The cushions and blankets are no longer fit for their designated use on Shabbat, and this negation of their designated use is similar to the prohibited labor of dismantling. The Gemara answers: Rav holds that negating a vessel’s preparedness is prohibited by rabbinic law. Causing a living creature to suffer is a Torah prohibition. And a matter prohibited by Torah law comes and overrides a matter prohibited by rabbinic law.

Maimonides Guide of the Perplexed (3, 48)

"People should be restrained and prevented from killing the two together in such a manner that the young is slain in the sight of the mother, for the pain of the animals under such circumstances is very great. There is no difference in this case between the pain of man and pain of other living beings, since the love and tenderness of the mother for her young ones is not produced by reasoning, but by imagination, and this faculty exists not only in man but in most living beings."

(כ) מֻתָּר לוֹמַר לְעַכּוּ''ם לַחְלֹב בְּהֶמְתּוֹ בְּשַׁבָּת מִשּׁוּם צַעַר בַּעֲלֵי חַיִּים שֶׁהֶחָלָב מְצַעֲרָהּ, וְהֶחָלָב אָסוּר בּוֹ בַּיּוֹם. וְיֵשׁ אוֹמְרִים שֶׁצָּרִיךְ לִקְנוֹתוֹ מִן הָעַכּוּ''ם בְּדָבָר מוּעָט, שֶׁלֹּא יְהֵא נִרְאֶה כְּחוֹלֵב לְצֹרֶךְ יִשְׂרָאֵל.

One can ask a gentile to milk his cow on Shabbat because of Tza'ar Ba'aley Hayyim, because the milk hurts her. But the milk is forbidden [to drink] on that same day. And there are those who saw that one needs to buy it for a smaller than normal amount from the gentile so that it does not appear that they milked in order to fulfill the needs of a Jew.

ע"י מעשה באו מאי היא דההוא עגלא דהוו קא ממטו ליה לשחיטה אזל תליא לרישיה בכנפיה דרבי וקא בכי אמר ליה זיל לכך נוצרת אמרי הואיל ולא קא מרחם ליתו עליה יסורין וע"י מעשה הלכו יומא חד הוה קא כנשא אמתיה דרבי ביתא הוה שדיא בני כרכושתא וקא כנשא להו אמר לה שבקינהו כתיב (תהלים קמה, ט) ורחמיו על כל מעשיו אמרי הואיל ומרחם נרחם עליה
The Gemara stated that Rabbi Yehuda HaNasi’s suffering came upon him due to an incident. What was that incident that led to his suffering? The Gemara answers that there was a certain calf that was being led to slaughter. The calf went and hung its head on the corner of Rabbi Yehuda HaNasi’s garment and was weeping. Rabbi Yehuda HaNasi said to it: Go, as you were created for this purpose. It was said in Heaven: Since he was not compassionate toward the calf, let afflictions come upon him. The Gemara explains the statement: And left him due to another incident. One day, the maidservant of Rabbi Yehuda HaNasi was sweeping his house. There were young weasels [karkushta] lying about, and she was in the process of sweeping them out. Rabbi Yehuda HaNasi said to her: Let them be, as it is written: “The Lord is good to all; and His mercies are over all His works” (Psalms 145:9). They said in Heaven: Since he was compassionate, we shall be compassionate on him, and he was relieved of his suffering.

(יד) אָסוּר לוֹמַר לְכּוּתִי לְסָרֵס בְּהֵמָה שֶׁלָּנוּ. וְאִם לְקָחָהּ הוּא מֵעַצְמוֹ וְסֵרְסָהּ, מֻתָּר. וְאִם הֶעֱרִים יִשְׂרָאֵל בְּדָבָר זֶה, קוֹנְסִין אוֹתוֹ, וַאֲפִלּוּ לֹא הֶעֱרִים, וְהָגּוֹי מַכִּירוֹ וּמְכַוֵּן לְטוֹבָתוֹ, וּמוֹכְרָן לְיִשְׂרָאֵל אַחֵר, וַאֲפִלּוּ לִבְנוֹ גָּדוֹל מֻתָּר לְמָכְרָהּ, אֲבָל לִבְנוֹ קָטָן אֵינָהּ מוֹכְרָהּ וְלֹא נוֹתְנָהּ לוֹ. הַגָּה: וּמֻתָּר לָתֵת בְּהֵמָה לְגּוֹי לְמַחֲצִית שָׂכָר, אַף עַל פִּי שֶׁהַכּוּתִי בְּוַדַּאי יְסָרְסֶנּוּ (הַגָּהוֹת מַיְמוֹנִי פט''ז מֵהִלְכוֹת א''ב), דְּגוֹי אַדַּעְתָּא דְּנַפְשֵׁהּ קָא עָבִיד (בֵּית יוֹסֵף). וּמֻתָּר לִמְכֹּר לְכוּתִים בְּהֵמוֹת וְתַרְנְגוֹלִים, אַף עַל גַּב דִּבְוַדַּאי הַכּוּתִי קוֹנֶה אוֹתָם לְסָרְסָם. (וְיֵשׁ אוֹסְרִים תִּמְצָא מְבֹאָר בִּתְרוּמַת הַדֶּשֶׁן סִי' רצ''ד) וּמִיהוּ, אִם אֵין הַכּוּתִי הַקּוֹנֶה מְסָרְסָם בְּעַצְמוֹ, רַק נוֹתְנוֹ לְכוּתִי אַחֵר לְסָרֵס, לְכֻלֵּי עָלְמָא שָׁרֵי (ג''ז שָׁם). כָּל דָּבָר הַצָּרִיךְ לִרְפוּאָה אוֹ לִשְׁאָר דְּבָרִים, לֵית בֵּהּ מִשּׁוּם אִסוּר צַעַר בַּעֲלֵי חַיִּים (אִסוּר וְהֶתֵּר הָאָרֹךְ סִימָן נ''ט). וְלָכֵן מֻתָּר לִמְרֹט נוֹצוֹת מֵאֲוָזוֹת חַיּוֹת, וְלֵיכָּא לְמֵיחַשׁ מִשּׁוּם צַעַר בַּעֲלֵי חַיִּים (מהרא''י סִי' ק''ה). וּמִכָּל מָקוֹם הָעוֹלָם נִמְנָעִים דְּהָוֵי אַכְזָרִיּוּת:

Any [action] needed for healing or other reasons, there is no prohibition of "causing pain to animals" (Issur V'Heter Extended 59). And therefore it is permitted to pluck the feathers of wild geese, and there is no potential problem of "causing pain to animals" (Mahar"i 105). Nevertheless, the world withholds from it because of its cruelty.