Our teacher, the Rema, wrote in section 17: If the house burned down, its law is like that of one that collapsed; if the entire city burned down, it is a regional plague, and he deducts from his rent for what he did not dwell in, whether he preceded his rent to him or not. Thus far his words. And it is difficult, for in the case of collapse the law is also thus, that for what he dwelt in he pays and for what he did not dwell in he returns to him, as has been explained; if so, even without the entire city burning, the law is like when the entire city burned, and why does our teacher, the Rema, distinguish between this house burning and the entire city burning? However, from the source of the law it is explained well, for behold its source is from the Teshuvot Maimoni, Mishpatim, and there are two responsa there: one in siman 27 from the Rashba, the author of the Tosafot, and he holds there that even if the house collapsed, the renter is obligated to pay him also the rent for the future because his luck caused it [and so he brought from Rashi, chapter 5 of HaSho'el, however it is not in our Rashi, and the Nimukei Yosef wrote in the name of many Rishonim the opposite, as I have written]. However, when the entire city or most of it burned, which is like a regional plague, he also admits in his responsum there that he must return to the renter for what he did not dwell in if the renter preceded his rent to him, see there. However, when only his house burned, he ruled there that its law is like a collapse, and according to his system, he pays him even for what he did not dwell in, and he disagrees with all the poskim. And there in siman 47 there is a responsum of the Maharam of Rothenburg regarding a renter's house that burned, and he also ruled that its law is like a collapse, except that it is explained there that he holds regarding collapse like most poskim, that for what he dwelt in he must pay and for what he did not dwell in the landlord must return to him, see there. And this is the intent of our teacher, the Rema: "If the house burned down, its law is like that of one that collapsed," meaning, according to the opinion of most poskim that in a collapse, for what he dwelt in he must pay and for what he did not dwell in he must return to him, so too in a case of burning. And for the one who holds that in a collapse he must pay the entire rent, also in a case of burning he must pay the entire rent. However, if the entire city burned—and not specifically all, but rather that there was a great fire, may Hashem save us—even according to this opinion that in a collapse one must pay the entire rent, he admits that in this case he need only pay for what he dwelt in, and if he gave more, the landlord is obligated to return it to him. Therefore, in truth, regarding the law where we also established thus for a collapse as has been explained, and our teachers the authors of the Shulchan Aruch did not bring at all the lone opinion we mentioned, there is no difference at all between his house alone burning and the entire city burning; rather, our teacher, the Rema, distinguishes them because they are distinct in their reasoning, for even according to the one who disagrees regarding collapse, he admits regarding the entire city burning. But as for the law, there is no difference, and so all the poskim and all the great Acharonim agreed that even if only his house burned, he pays him for what he dwelt in even if he did not give it to him yet, and for what he did not dwell in he does not pay him, and even if he preceded his rent to him, he returns it to him, and such is the primary law [and the Sma and the Taz emended his words, but there is no need for this, and as for the law, the Taz also ruled thus, see there; and in vain did the Netivot HaMishpat toil over the words of the Rema and was very pressed, and the matter is clear as I have written].
כתב רבינו הרמ"א בסעיף י"ז נשרף הבית דינו כנפל נשרף כל העיר הוי מכת מדינה ומנכה לו מן שכירותו מה שלא דר בו בין הקדים לו שכרו או לא עכ"ל וקשה הא בנפל ג"כ הדין כן שמה שדר בו משלם ומה שלא דר בו מחזיר לו כמו שנתבאר וא"כ אף בלא נשרפה כל העיר הדין כמו בנשרפה כל העיר ומאי מחלק רבינו הרמ"א בין נשרף הבית הזה לנשרפה כל העיר אמנם ממקור הדין מתבאר יפה דהנה מקורו מתשובת מיימוני משפטים ויש שם שני תשובות האחת בסי' כ"ז מרשב"א בעל התוס' וס"ל שם דגם בנפל הבית חייב השוכר לשלם לו גם השכירות דלהבא משום דמזלא דידיה גרם [וכן הביא מרש"י ס"ה השואל אמנם לפנינו אינו ברש"י והנמק"י כתב בשם הרבה ראשונים להיפך וכמ"ש] אמנם כשנשרף כל העיר או רובה דהוי כמכת מדינה מודה גם הוא בתשובתו שם שצריך להחזיר לו להשוכר מה שלא דר בו אם השוכר הקדים לו שכרו ע"ש אמנם כשנשרפה רק ביתו פסק שם דדינו כנפל ולשיטתו משלם לו גם בעד מה שלא דר בה וחולק על כל הפוסקים ושם בסי' מ"ז יש תשובה להר"מ מר"ב בנשרף בית השוכר פסק ג"כ דדינה כנפל אלא דמבואר שם דס"ל בנפל כרוב הפוסקים דמה שדר בה צריך לשלם ומה שלא דר צריך המשכיר להחזיר לו ע"ש וזהו כוונת רבינו הרמ"א נשרף הבית דינו כנפל כלומר לדעת רוב הפוסקים דבנפל מה שדר צריך לשלם ומה שלא דר צריך להחזיר לו כמו כן בנשרף ולמאן דס"ל דבנפל צריך לשלם כל השכר גם בנשרף צריך לשלם כל השכר אמנם בנשרפה כל העיר ולאו דוקא כל אלא שהיתה שריפה גדולה ה' יצילנו גם לדעה זו דבנפל צריך לשלם כל השכר מודה דבזה א"צ לשלם רק מה שדר בה ואם נתן יותר חייב המשכיר להחזיר לו ולכן באמת לדינא דבנפל קיי"ל ג"כ כן כמו שנתבאר ורבותינו בעלי הש"ע לא הביאו כלל הדעה יחידאה שהבאנו אין חילוק כלל בין נשרף ביתו לבד ובין נשרפה כל העיר אלא שרבינו הרמ"א מחלקם מפני שחלוקים בטעמם דאפילו למאן דחולק בנפל מודה בנשרפה כל העיר אבל לדינא אין חילוק וכן הסכימו כל הפוסקים וכל גדולי אחרונים דגם בנשרף ביתו בלבד משלם לו מה שדר בה אף שלא נתן לו עדיין ומה שלא דר בה אינו משלם לו ואף אם הקדים לו שכרו מחזיר לו וכן עיקר לדינא [והסמ"ע והט"ז הגיהו בדבריו וא"צ לזה ולדינא פסק הט"ז ג"כ כן ע"ש ולחנם טרח הנתיבות משפט בדבריו של הרמ"א ונדחק מאד והדבר ברור כמ"ש]: