Shabbos24: 1
מִי שֶׁהֶחְשִׁיךְ בַּדֶּרֶךְ, נוֹתֵן כִּיסוֹ לְנָכְרִי, וְאִם אֵין עִמּוֹ נָכְרִי, מַנִּיחוֹ עַל הַחֲמוֹר. הִגִּיעַ לֶחָצֵר הַחִיצוֹנָה, נוֹטֵל אֶת הַכֵּלִים הַנִּטָּלִין בַּשַּׁבָּת; וְשֶׁאֵינָן נִטָּלִין בַּשַּׁבָּת, מַתִּיר אֶת הַחֲבָלִים, וְהַשַּׂקִּין נוֹפְלִין מֵאֲלֵיהֶם:
If darkness overtakes a person on the road, he may give his purse to a gentile; if no gentile is with him, he may place it on the donkey. When he reaches the outermost courtyard, he may remove those objects that may be handled on the Sabbath; and [as for] those that may not be handled on the Sabbath, he may untie the ropes, and [allow] the sacks [to] fall of themselves.