שולחן ערוך, אורח חיים קנ״ב
Shulchan Arukh, Orach Chayim 152
שלא לסתור שום בית הכנסת. ובו סעיף אחד:
אין סותרין בית הכנסת כדי לבנות בהכ"נ אחר שמא יארע להם אונס שלא יבנו האחר אלא בונים אחר תחלה ואחר כך סותרים הישן (ואפי' לא רצו לסתור רק מחיצה א' להרחיבו נמי דינא הכי (רבינו ירוחם נ"ג ח"ה וב"י בשם רמב"ם) והני מילי שהיה ראשון חזק אבל אם חרבו יסודותיו או נטו כתליו ליפול סותרים אותו מיד ומתחילין לבנות במהרה ביום ובלילה שמא תדחק השעה וישאר חרוב: הגה ואסור ליקח אבנים מב"ה הישנה כדי לבנות חדשה. (הג"א פ' ב"ה) ואסור לסתור דבר מב"ה אלא אם כן עושה על מנת לבנות: (מרדכי פ' בני העיר):
אין סותרין בית הכנסת כדי לבנות בהכ"נ אחר שמא יארע להם אונס שלא יבנו האחר אלא בונים אחר תחלה ואחר כך סותרים הישן (ואפי' לא רצו לסתור רק מחיצה א' להרחיבו נמי דינא הכי (רבינו ירוחם נ"ג ח"ה וב"י בשם רמב"ם) והני מילי שהיה ראשון חזק אבל אם חרבו יסודותיו או נטו כתליו ליפול סותרים אותו מיד ומתחילין לבנות במהרה ביום ובלילה שמא תדחק השעה וישאר חרוב: הגה ואסור ליקח אבנים מב"ה הישנה כדי לבנות חדשה. (הג"א פ' ב"ה) ואסור לסתור דבר מב"ה אלא אם כן עושה על מנת לבנות: (מרדכי פ' בני העיר):
To Not Destroy Any Synagogue. Containing 1 S'if:
We do not destroy a synagogue in order to build another synagogue lest something befall them such that they do not build the other; rather we build the other first, and afterwards we destroy the old. (And even if they only want to destroy one wall to widen [the synagogue], this ruling applies (Rabbeinu Yerucham 53:5 and Beit Yosef in the name of the Rambam].) And this is the case if the first [synagogue] is strong; but if they destroyed its foundations or they tilted its walls to fall, we destroy it immediately, and quickly begin to build, during the day and night, lest time becomes pressing and it remains destroyed. Gloss: And it is forbidden to take stones from the old synagogue to build a new one (Hagahot Asheri on Chapter [4 of Megillah], "B'nai Ha-ir"). And it is forbidden to destroy anything from a synagogue unless it done in order to build. (Mordechai on Chapter [4 of Megillah] "B'nei Ha'ir")
We do not destroy a synagogue in order to build another synagogue lest something befall them such that they do not build the other; rather we build the other first, and afterwards we destroy the old. (And even if they only want to destroy one wall to widen [the synagogue], this ruling applies (Rabbeinu Yerucham 53:5 and Beit Yosef in the name of the Rambam].) And this is the case if the first [synagogue] is strong; but if they destroyed its foundations or they tilted its walls to fall, we destroy it immediately, and quickly begin to build, during the day and night, lest time becomes pressing and it remains destroyed. Gloss: And it is forbidden to take stones from the old synagogue to build a new one (Hagahot Asheri on Chapter [4 of Megillah], "B'nai Ha-ir"). And it is forbidden to destroy anything from a synagogue unless it done in order to build. (Mordechai on Chapter [4 of Megillah] "B'nei Ha'ir")
Maginei Eretz: Shulchan Aruch Orach Chaim, Lemberg, 1893 (Public Domain) · Sefaria Community Translation (CC0) · 1 seif