The Pri Megadim [א"א ש"ח ס"ח] says that even though there is a machlokes in the gemara if צער בעלי חיים is מדאורייתא or מדרבנן, nevertheless, on Shabbos everyone holds that it is מדאורייתא b/c the Torah commands us למען ינוח שורך וחמורך - our animals must rest. צער בעלי חיים is the opposite of מנוחה.
Question:
חֲמוֹרוֹ שֶׁל רַבָּן גַּמְלִיאֵל הָיְתָה טְעוּנָה דְּבַשׁ וְלֹא רָצָה לְפוֹרְקָהּ עַד מוֹצָאֵי שַׁבָּת, לְמוֹצָאֵי שַׁבָּת מֵתָה. וְהָאֲנַן תְּנַן נוֹטֵל כֵּלִים הַנִּיטָּלִין? כְּשֶׁהִדְבִּישׁ. הִדְבִּישׁ לְמַאי חֲזֵי? לִכְתִיתָא דְגַמְלֵי.
The Gemara relates: Rabban Gamliel’s donkey was laden with honey and he did not want to unload the donkey until the conclusion of Shabbos. At the conclusion of Shabbos, the donkey died of fatigue. The Gemara asks: Didn’t we learn in the mishna: He takes the vessels that may be moved on Shabbos off the donkey? Why, then, did Rabban Gamliel not unload the honey? The Gemara answers: This is a case where the honey had spoiled. The Gemara asks: For what use is spoiled honey suited? Why did Rabban Gamliel bring it? The Gemara answers: It can be used to rub on the wounds of camels.
וְיַתִּיר חֲבָלִים וְיִפְּלוּ שַׂקִּין! מִיצְטְרוּ זִיקֵי. וְיָבִיא כָּרִים וּכְסָתוֹת וְיַנִּיחַ תַּחְתֵּיהֶן! מִטַּנְּפִי, וְקָמְבַטֵּל כְּלִי מֵהֵיכָנוֹ. וְהָאִיכָּא צַעַר בַּעֲלֵי חַיִּים! קָסָבַר: צַעַר בַּעֲלֵי חַיִּים דְּרַבָּנַן.
The Gemara asks: And let Rabban Gamliel untie the ropes and the bags will fall on their own. The Gemara answers: It was due to the concern that the jugs containing the honey would crack. The Gemara asks: And let him bring cushions and blankets and place them beneath the jugs. The Gemara answers: He was concerned lest they become soiled and he would thereby negate the vessel’s preparedness, i.e., the cushions and blankets would be rendered unusable. The Gemara asks: Isn’t there the matter of the suffering of a living creature? He should suffer monetary loss rather than cause the animal to suffer. The Gemara answers: Rabban Gamliel holds that causing a living creature to suffer is prohibited not by Torah law but rather by rabbinic law. Therefore, he need not suffer monetary loss due to the rabbinic prohibition (Ramban).
We see that even on Shabbos צער בעלי חיים is מדרבנן???