One who takes the donkey or horse of his fellow without the knowledge of the owner and performed work with it, even though it was his intention to give him its wage, nevertheless, he is like a borrower without knowledge and is a gazlan and is liable for accidents. And if the animal is available for hire, he is not a gazlan and is exempt from accidents, but for the depreciation due to the work he is liable, as the will of the owner in this is more than in its hiring, as has been written in siman 365 [Netivot HaMishpat]. However, if the members of the household protested against him and said to him that the owner of the animal needs it now, he is like one acting without knowledge and is a gazlan. And in any place where his law is as a gazlan, he must pay its depreciation and not its wage, as has been written there. And if there is no depreciation in it, he does not need to pay anything, for all gazlanim pay according to the time of the theft. However, when a sudden loss occurred to the householder and he was forced to take the animal of his fellow to save his loss, and he wants to give him his loss or his wage, he is not a gazlan. And ab initio he is permitted to do so without the knowledge of the owner of the animal, for it is a condition of the beit din that anyone who encounters a sudden damage has the authority to take the vessels and animals of his fellow to save himself from the loss and gives him his wage, as has been written in siman 264. And even if it died due to the work he is exempt, since it is a condition of the beit din [ibid.], it is like a hirer with the knowledge of the owner who is exempt in such a case, for even a borrower is exempt if it died due to the work. And even according to the opinion of those who disagree in siman 274, that is only that he cannot compel him against his will, but when he is not here, all agree that he may take it without his knowledge to save his loss [Sma].
הלוקח חמורו או סוסו של חבירו שלא מדעת בעלים ועשה עמו מלאכה אע"פ שהיה בדעתו ליתן לו שכרו מ"מ הוא כשואל שלא מדעת והוה גזלן וחייב באונסים ואם הבהמה עומדת לשכור לא הוי גזלן ופטור מאונסים אבל בפחת שמחמת מלאכה חייב כשרצון הבעלים בזה יותר מבשכרה כמ"ש בסי' שס"ה [נה"מ] ומיהו אם מיחו בו בני הבית ואמרו לו שבעל הבהמה צריך לה עתה הוי כשלא מדעת והוא גזלן ובכל מקום שדינו כגזלן צריך לשלם פחתה ולא שכרה כמ"ש שם ואם אין בה פחת א"צ לשלם כלום דכל הגזלנים משלמים כשעת הגזילה אמנם כשאירע לבעה"ב איזה הפסד פתאומי והוכרח ליטול בהמתו של חבירו להציל הפסדו ורוצה ליתן לו הפסדו או שכרו לא הוי גזלן ולכתחילה רשאי לעשות כן בלא דעת בעל הבהמה דתנאי ב"ד הוא דכל מי שפגע בו היזק פתאומי הרשות בידו ליקח כליו ובהמותיו של חבירו להציל א"ע מן ההפסד ונותן לו שכרו כמ"ש בסי' רס"ד ואפילו מתה מחמת מלאכה פטור כיון דתנאי ב"ד הוא [שם] הוי כשוכר מדעת בעלים דפטור בכה"ג דהא אפילו שואל פטור במתה מחמת מלאכה ואפילו לדעת החולקים בסי' רד"ע זהו שאינו יכול לכופו בע"כ אבל כשאינו כאן הכל מודים שיכול ליקח שלא מדעתו להציל הפסדו [סמ"ע]: