The Shulchan Aruch · Orach Chayim
אורח חיים שמ״בOrach Chayim 342
Siman 342 of 697 in Orach Chayim — 1 se'if
הלכות שבתLaws of Shabbat· siman 342
Se’if 1א׳
כָּל הַדְּבָרִים שֶׁהֵם אֲסוּרִים מִדִּבְרֵי סוֹפְרִים לֹא גָּזְרוּ עֲלֵיהֶם בֵּין הַשְּׁמָשׁוֹת, וְעַיֵּן לְעֵיל סי' רס"א (וְסוֹף סִימָן ש"ז), וְהוּא שֶׁיְּהֵא שָׁם דְּבַר מִצְוָה אוֹ דֹּחַק, כֵּיצַד, מֻתָּר לוֹ בֵּין הַשְּׁמָשׁוֹת לַעֲלוֹת בְּאִילָן, אוֹ לָשׁוּט עַל פְּנֵי הַמַּיִם לְהָבִיא לוּלָב אוֹ שׁוֹפָר, וְכֵן מוֹרִיד מֵהָאִילָן אוֹ מוֹצִיא מֵהַכַּרְמְלִית עֵרוּב שֶׁעָשָׂה, וְכֵן אִם הָיָה טָרוּד וְנֶחְפָּז לְדָבָר שֶׁהוּא מִשּׁוּם שְׁבוּת, מֻתָּר בֵּין הַשְּׁמָשׁוֹת; וּמִטַּעַם זֶה מֻתָּר לוֹמַר בֵּין הַשְּׁמָשׁוֹת לְעַכּוּ"ם לְהַדְלִיק לוֹ נֵר לְשַׁבָּת.
It Is Permitted At Twilight to Do Things Forbidden by Chazal By Enactment Everything that was forbidden by the rabbis was not forbidden at twilight (and see above chapter 261 and the end of chapter 307). This is only true if there is some mitzvah involved or it is a pressing circumstance. For example, one is permitted to climb a tree or float on the water in order to bring a lulav or a shofar. Similarly, one can lower an eruv that he made from a tree or take it from the carmelit. Similarly, if one is bothered and anxious about some rabbinically forbidden act (shvut), he is permitted to do it at twilight. For the same reason, one is permitted to tell a non-Jew to light a candle on Shabbat at twilight.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0