Defying the Law of the Land

(ד) לחנוכה: בִּימֵי מַתִּתְיָהוּ בֶּן יוחָנָן כּהֵן גָּדול חַשְׁמונַאִי וּבָנָיו. כְּשֶׁעָמְדָה מַלְכוּת יָוָן הָרְשָׁעָה עַל עַמְּךָ יִשרָאֵל לְהַשְׁכִּיחָם תּורָתֶךָ וּלְהַעֲבִירָם מֵחֻקֵּי רְצונֶךָ: וְאַתָּה בְּרַחֲמֶיךָ הָרַבִּים עָמַדְתָּ לָהֶם בְּעֵת צָרָתָם. רַבְתָּ אֶת רִיבָם. דַנְתָּ אֶת דִּינָם. נָקַמְתָּ אֶת נִקְמָתָם. מָסַרְתָּ גִבּורִים בְּיַד חַלָּשִׁים. וְרַבִּים בְּיַד מְעַטִּים. וּטְמֵאִים בְּיַד טְהורִים. וּרְשָׁעִים בְּיַד צַדִּיקִים. וְזֵדִים בְּיַד עוסְקֵי תורָתֶךָ. וּלְךָ עָשיתָ שֵׁם גָּדול וְקָדושׁ בְּעולָמֶךָ. וּלְעַמְּךָ יִשרָאֵל עָשיתָ תְּשׁוּעָה גְדולָה וּפֻרְקָן כְּהַיּום הַזֶּה: וְאַחַר כֵּן בָּאוּ בָנֶיךָ לִדְבִיר בֵּיתֶךָ. וּפִנּוּ אֶת הֵיכָלֶךָ. וְטִהֲרוּ אֶת מִקְדָּשֶׁךָ. וְהִדְלִיקוּ נֵרות בְּחַצְרות קָדְשֶׁךָ. וְקָבְעוּ שְׁמונַת יְמֵי חֲנֻכָּה אֵלּוּ. לְהודות וּלְהַלֵּל לְשִׁמְךָ הַגָּדול:

(4) In the days of Mattisyahu, the son of Yochanan the High Priest, the Hasmonean, and his sons, when the wicked kingdom of Greece rose up against Your people Israel to make them forget Your Torah and to stray from the laws of Your will, You, with great mercy stood by them in the time of their distress. You fought their fight, judged their cause and avenged them with vengence. You delivered the strong into the hands of the weak, the many into the hands of the few, the impure into the hands of the pure, the wicked into the hands of the righteous and the arrogant into the hands of those engaged with Your Torah. For Yourself you made a great and holy name in Your world, You performed a great deliverance for Your people Israel on this day. After these things, Your children entered into the Holy of Holies of Your House, cleansed Your Temple, purified the place of Your Holiness, kindled lights in Your holy courts and established these eight days of Hanukkah to express thanksgiving and praise to Your great name.)

כי אתא רב דימי א"ר יוחנן לא שנו אלא שלא בשעת גזרת המלכות) אבל בשעת גזרת המלכות אפי' מצוה קלה יהרג ואל יעבור
§ When Rav Dimi came from Eretz Yisrael to Babylonia, he said that Rabbi Yoḥanan said: The Sages taught that one is permitted to transgress prohibitions in the face of mortal danger only when it is not a time of religious persecution. But in a time of religious persecution, when the gentile authorities are trying to force Jews to violate their religion, even if they issued a decree about a minor mitzva, one must be killed and not transgress.
מאי מצוה קלה אמר רבא בר רב יצחק אמר רב
The Gemara asks: What is a minor mitzva for this purpose? Rava bar Yitzḥak says that Rav says:
אפילו לשנויי ערקתא דמסאנא
Even to change the strap of a sandal. There was a Jewish custom with regard to sandal straps. If the gentile authorities were to decree that Jews must change their practice and wear sandal straps like those worn by the gentiles, one would be obligated to give up his life rather than veer from the accepted custom.
ואפילו מצוה קלה יהרג ואל יעבור - שלא ירגילו העובדי כוכבים להמריך את הלבבות לכך:

One must give up one's life rather than violate even a minor mitzva - The reason is so that the idolaters will not become accustomed to soften the hearts by [making their decrees]