The Gemara recounts the encounter with the men of the Great Assembly and their prayer concerning the evil inclination, providing the central rabbinic setting for Nicanor's name and Temple-era memory.
יוֹם שֶׁבִּקְּשׁוּ כּוּתִיִּים אֶת בֵּית אֱלֹהֵינוּ מֵאֲלֶכְּסַנְדְּרוֹס מוֹקְדוֹן לְהַחְרִיבוֹ, וְנָתְנוּ לָהֶם. בָּאוּ וְהוֹדִיעוּ אֶת שִׁמְעוֹן הַצַּדִּיק. מֶה עָשָׂה? לָבַשׁ בִּגְדֵי כְהוּנָּה, וְנִתְעַטֵּף בְּבִגְדֵי כְהוּנָּה, וּמִיַּקִּירֵי יִשְׂרָאֵל עִמּוֹ, וַאֲבוּקוֹת שֶׁל אוֹר בִּידֵיהֶן. וְכׇל הַלַּיְלָה, הַלָּלוּ הוֹלְכִים מִצַּד זֶה, וְהַלָּלוּ הוֹלְכִים מִצַּד זֶה, עַד שֶׁעָלָה עַמּוּד הַשַּׁחַר. כֵּיוָן שֶׁעָלָה עַמּוּד הַשַּׁחַר, אָמַר לָהֶם: מִי הַלָּלוּ? אָמְרוּ לוֹ: יְהוּדִים שֶׁמָּרְדוּ בְּךָ. כֵּיוָן שֶׁהִגִּיעַ לְאַנְטִיפַּטְרֵס זָרְחָה חַמָּה וּפָגְעוּ זֶה בָּזֶה. כֵּיוָן שֶׁרָאָה לְשִׁמְעוֹן הַצַּדִּיק, יָרַד מִמֶּרְכַּבְתּוֹ וְהִשְׁתַּחֲוָה לְפָנָיו. אָמְרוּ לוֹ: מֶלֶךְ גָּדוֹל כְּמוֹתְךָ יִשְׁתַּחֲוֶה לִיהוּדִי זֶה?! אָמַר לָהֶם: דְּמוּת דְּיוֹקְנוֹ שֶׁל זֶה מְנַצַּחַת לְפָנַי בְּבֵית מִלְחַמְתִּי. אָמַר לָהֶם: לָמָּה בָּאתֶם? אָמְרוּ: אֶפְשָׁר בַּיִת שֶׁמִּתְפַּלְּלִים בּוֹ עָלֶיךָ וְעַל מַלְכוּתְךָ שֶׁלֹּא תֶּחְרַב, יַתְעוּךָ גּוֹיִם לְהַחְרִיבוֹ? אָמַר לָהֶם: מִי הַלָּלוּ? אָמְרוּ לוֹ: כּוּתִיִּים הַלָּלוּ, שֶׁעוֹמְדִים לְפָנֶיךָ. אָמַר לָהֶם: הֲרֵי הֵם מְסוּרִין בִּידֵיכֶם.
What occurred on that date? It was on that day that the Samaritans [kutim] requested the House of our Lord from Alexander the Macedonian in order to destroy it, and he gave it to them, i.e., he gave them permission to destroy it. People came and informed the High Priest, Shimon HaTzaddik, of what had transpired. What did he do? He donned the priestly vestments and wrapped himself in the priestly vestments. And the nobles of the Jewish People were with him, with torches of fire in their hands. And all that night, these, the representatives of the Jewish people, approached from this side, and those, the armies of Alexander and the Samaritans, approached from that side, until dawn, when they finally saw one another. When dawn arrived, Alexander said to the Samaritans: Who are these people coming to meet us? They said to him: These are the Jews who rebelled against you. When he reached Antipatris, the sun shone and the two camps met each other. When Alexander saw Shimon HaTzaddik, he descended from his chariot and bowed before him. His escorts said to him: Should an important king such as you bow to this Jew? He said to them: I do so because the image of this man’s face is victorious before me on my battlefields, i.e., when I fight I see his image going before me as a sign of victory, and therefore I know that he has supreme sanctity. He said to the representatives of the Jewish people: Why have you come? They said to him: Is it possible that the Temple, the house in which we pray for you and for your kingdom not to be destroyed, gentiles will try to mislead you into destroying it, and we would remain silent and not tell you? He said to them: Who are these people who want to destroy it? The Jews said to him: They are these Samaritans who stand before you. He said to them: If so, they are delivered into your hands to deal with them as you please.