All that night Lot was seeking mercy on behalf of the Sodomites, and they were accepting it from his hand. When they said (below, 19:5) "Where are the men? Bring them out to us, that we may know them" for intercourse, immediately they said to him (there, verse 12) "Whom else have you here?" Up to here you had permission to teach a defense; from here onward you have no permission. His disciples asked Rav Yosef: What is "Azazel"? He said to them: When the generation of the Flood arose and worshiped idolatry, the Holy One, blessed be He, was grieved. Immediately two angels arose, Shamchazai and Azazel, and said before Him: "Master of the universe, did we not say before You when You created Your world, 'What is man that You are mindful of him?' (Psalms 8:5)." He said to them: "And the world, what shall become of it?" They said to Him: "Master of the universe, we would have managed with it." He said to them: "It is revealed and known before Me that if you were dwelling on the earth, the evil inclination would rule over you, and you would be harsher than human beings." They said to Him: "Give us permission and we will dwell among the creatures, and You will see how we sanctify Your name." He said to them: "Go down and dwell among them." Immediately they became corrupt with the daughters of man, who were beautiful, and they could not subdue their inclination. Immediately Shamchazai saw a certain maiden whose name was Istahar. He set his eyes upon her; he said: "Hearken to me." She said to him: "I will not hearken to you until you teach me the Ineffable Name by which you ascend to the firmament when you mention it." He taught her that Name; she mentioned it and ascended to the firmament and did not become corrupt. The Holy One, blessed be He, said: "Since she separated herself from the transgression, go and set her among these seven stars, so that you may gain merit through them forever," and she was set in the Pleiades. When Shamchazai and Azazel saw this, they arose and took wives and begot children, Hiva and Hiya. And Azazel was over the kinds of dyes and over the kinds of ornaments of women that entice human beings to thoughts of transgression. Immediately Metatron sent a messenger to Shamchazai and said to him: "The Holy One, blessed be He, is destined to destroy His world and to bring a flood upon the world." Immediately he stood up weeping and was grieved over the world and over his sons: what would his sons do, from what would they eat if the world were destroyed, for each and every one of them used to eat each day a thousand camels and a thousand horses and a thousand oxen. At night Hiva and Hiya, both of them, saw dreams. One of them saw a great stone spread over the earth like a table, and the earth was engraved and written in lines upon lines, and an angel was descending from the firmament and in his hands a kind of knife, and he was scraping and erasing all those lines and left in it only four words. And the other one saw a great, excellent orchard planted with all kinds of trees, and in it were angels and in their hands axes, and they were cutting down all the trees and left in it only one tree of three branches. When they awoke, they arose in alarm and came to their father. He said to them: "The Holy One, blessed be He, is destined to bring a flood, and He will leave only Noah and his sons." When they heard this, they were crying out and weeping. He said to them: "Do not grieve, for your names will not cease from among the creatures, for whenever one decrees decrees, or raises up stones, or ships, they mention your names, Hiva and Hiya." Immediately their minds were set at ease. Shamchazai repented and suspended himself between heaven and earth, his head downward and his feet upward, and he is still suspended in repentance. Azazel did not repent and still stands in his corruption, to incite human beings to a matter of transgression by means of the colored garments of women. And for this reason Israel used to offer sacrifices on the Day of Atonement, one ram to the LORD to atone for Israel, and one ram to Azazel that he should bear the iniquities of Israel; and he is the Azazel of the Torah.
The Star Maiden
Yalkut Shimoni, Bereishit 44
כָּל אוֹתָהּ הַלַּיְלָה הָיָה לוֹט מְבַקֵּשׁ רַחֲמִים עַל הַסְּדוֹמִיִים וְהָיוּ מְקַבְּלִין מִיָּדוֹ, כֵּיוָן שֶׁאָמְרוּ (להלן יט ה) "אַיֵּה הָאֲנָשִׁים הוֹצִיאֵם אֵלֵינוּ וְנֵדְעָה אֹתָם" לְתַשְׁמִיש, מִיָּד אָמְרוּ לוֹ (שם יב) "עֹד מִי לְךָ פֹה" עַד כָּאן הָיָה לְךָ רְשׁוּת לְלַמֵּד סַנֵּגוֹרְיָא, מִכָּאן וְאֵילָךְ אֵין לְךָ רְשׁוּת. שָׁאֲלוּ תַּלְמִידָיו אֶת רַב יוֹסֵף, מַהוּ "עֲזָאֵל". אָמַר לָהֶם כֵּיוָן שֶׁעָמְדוּ דּוֹר הַמַּבּוּל וְעָבְדוּ עֲבוֹדָה זָרָה הָיָה הַקָּדוֹשׁ בָּרוּךְ הוּא מִתְעַצֵּב. מִיָּד עָמְדוּ שְׁנֵי מַלְאָכִים שַׁמְחֲזַאי וַעֲזָאֵל וְאָמְרוּ לְפָנָיו, רִבּוֹנוֹ שֶׁל עוֹלָם, הֲלֹא אָמַרְנוּ לְפָנֶיךָ כְּשֶׁבָּרָאתָ אֶת עוֹלָמְךָ (תהלים ח, ה) "מָה אֱנוֹשׁ כִּי תִזְכְּרֶנּוּ". אָמַר לָהֶם, וְעוֹלָם מַה יְּהֵא עָלָיו. אָמְרוּ לוֹ, רִבּוֹנוֹ שֶׁל עוֹלָם, הָיִינוּ מִסְתַּפְּקִין בּוֹ. אָמַר לָהֶם, גָּלוּי וְיָדוּעַ לְפָנַי אִם אַתֶּם שְׁרוּיִין בָּאָרֶץ הָיָה שׁוֹלֵט בָּכֶם יֵצֶר הָרָע וִהְיִיתֶם קָשִׁים מִבְּנֵי אָדָם. אָמְרוּ לוֹ, תֵּן לָנוּ רְשׁוּת וְנָדוּר עִם הַבְּרִיּוֹת וְתִרְאֶה אֵיךְ אָנוּ מְקַדְּשִׁין שְׁמֶךָ. אָמַר לָהֶם, רְדוּ וְתָדוּרוּ עִמָּהֶן. מִיָּד קִלְקְלוּ עִם בְּנוֹת הָאָדָם שֶׁהָיוּ יָפוֹת וְלֹא יָכְלוּ לִכְבֹּשׁ אֶת יִצְרָן. מִיָּד רָאָה שַׁמְחֲזַאי רִיבָה אַחַת וּשְׁמָהּ אִיסְטְהַר. נָתַן עֵינוֹ בָּהּ, אָמַר, הִשָּׁמְעִי לִי. אָמְרָה לֵיהּ, אֵינִי שׁוֹמַעַת לְךָ עַד שֶׁתְּלַמְּדֵנִי שֵׁם הַמְפֹרָשׁ שֶׁאַתָּה עוֹלֶה בּוֹ לָרָקִיעַ בְּשָׁעָה שֶׁאַתָּה זוֹכְרֵהוּ. לִמְּדָהּ אוֹתוֹ שֵׁם, הִזְכִּירָה אוֹתוֹ וְעָלְתָה לָרָקִיעַ וְלֹא קִלְקְלָה. אָמַר הַקָּדוֹשׁ בָּרוּךְ הוּא, הוֹאִיל וּפֵרְשָׁה עַצְמָהּ מִן הָעֲבֵרָה לְכוּ וְקִבְעוּהָ בֵּין שִׁבְעָה כּוֹכָבִים הַלָּלוּ כְּדֵי שֶׁתְּזַכּוּ בָּהֶן לָעוֹלָם וְנִקְבְּעָה בְּכִימָה כֵּיוָן שֶׁרָאוּ שַׁמְחֲזַאי וַעֲזָאֵל כָּךְ עָמְדוּ וְנָשְׂאוּ נָשִׁים וְהוֹלִידוּ בָּנִים הִיוָא וְהֵיָא. וַעֲזָאֵל הָיָה עַל מִינֵי צִבְעוֹנִין וְעַל מִינֵי תַּכְשִׁיטִין שֶׁל נָשִׁים שֶׁמְּפַתִּים אֶת בְּנֵי הָאָדָם לְהִרְהוּר עֲבֵרָה, מִיָּד שִׁגֵּר מְטַטְרוֹן שָׁלִיחַ לְשַׁמְחֲזַאי וְאָמַר לֵיהּ, עָתִיד הַקָּדוֹשׁ בָּרוּךְ הוּא לְהַחֲרִיב עוֹלָמוֹ ולְהָבִיא מַבּוּל לָעוֹלָם. מִיָּד עָמַד בִּבְכִי וְהָיָה מִצְטַעֵר עַל הָעוֹלָם וְעַל בָּנָיו, מַה יַּעֲשׂוּ בָּנָיו, מִמַּה יֹאכְלוּ אִם הָעוֹלָם חָרֵב, שֶׁכָּל אֶחָד וְאֶחָד הָיָה אוֹכֵל בְּכָל יוֹם אֶלֶף גְּמַלִּים וְאֶלֶף סוּסִים וְאֶלֶף שְׁוָרִים. בַּלַּיְלָה רָאוּ הִיוָא וְהֵיָא שְׁנֵיהֶם חֲלוֹמוֹת. אֶחָד מֵהֶן רָאָה אֶבֶן גְּדוֹלָה פְּרוּסָה עַל הָאָרֶץ כְּשֻׁלְחָן, וְהָיְתָה הָאָרֶץ חֲרוּתָה וּכְתוּבָה שִׁטּוֹת שִׁטּוֹת, וְהָיָה מַלְאָךְ יוֹרֵד מִן הָרָקִיעַ וּבְיָדָיו כְּמִין סַכִּין וְהָיָה גּוֹרֵר וּמוֹחֵק כָּל אוֹתָן הַשִּׁטּוֹת וְלֹא הָיָה מְשַׁיֵּר בָּהּ אֶלָּא אַרְבַּע תֵּבוֹת. וְהָאֶחָד רָאָה פַּרְדֵּס גָּדוֹל מְשֻׁבָּח נָטוּעַ מִכָּל מִינֵי אִילָנוֹת, וְהָיוּ בּוֹ מַלְאָכִים וּבְיָדָן קַרְדֻּמּוֹת וְהָיוּ מְקַצְּצִין כָּל הָאִילָנוֹת וְלֹא שִׁיְרוּ בּוֹ אֶלָּא אִילָן אֶחָד שֶׁל שְׁלֹשָׁה עֲנָפִים. כֵּיוָן שֶׁנִּנְעֲרוּ עָמְדוּ בְּבֶהָלָה וּבָאוּ אֵצֶל אֲבִיהֶם. אָמַר לָהֶם, עָתִיד הַקָּדוֹשׁ בָּרוּךְ הוּא לְהָבִיא מַבּוּל וְלֹא יְשַׁיֵּר אֶלָּא נֹחַ וּבָנָיו. כֵּיוָן שֶׁשָּׁמְעוּ כָּךְ הָיוּ צוֹעֲקִין וּבוֹכִין. אָמַר לָהֶם, אַל תִּצְטַעֲרוּ, שִׁשְׁמוֹתֵיכֶם לֹא יִכְלוּ מִן הַבְּרִיּוֹת, שֶׁכָּל זְמַן שֶׁגּוֹזֵר גְּזֵרוֹת אוֹ מַעֲלִין אֲבָנִים אוֹ סְפִינוֹת שְׁמוֹתֵיכֶם הֵן מַזְכִּירִין הִיוָא וְהֵיָא. מִיָּד נִתְקָרְרוּ דַּעְתָּן. שַׁמְחֲזַאי חָזַר בִּתְשׁוּבָה וְתָלָה עַצְמוֹ בֵּין שָׁמַיִם לָאָרֶץ רֹאשׁוֹ לְמַטָּה וְרַגְלָיו לְמַעְלָה וַעֲדַיִן הוּא תָּלוּי בִּתְשׁוּבָה. עֲזָאֵל לֹא חָזַר בִּתְשׁוּבָה וַעֲדַיִן הוּא עוֹמֵד בְּקִלְקוּלוֹ לְהָסִית בְּנֵי אָדָם לִדְבַר עֲבֵרָה בְּבִגְדֵי צִבְעוֹנִין שֶׁל נָשִׁים, וּלְכָךְ הָיוּ יִשְׂרָאֵל מַקְרִיבִין קָרְבָּנוֹת בְּיוֹם הַכִּפּוּרִים אַיִל אֶחָד לַה' שֶׁיְּכַפֵּר עַל יִשְׂרָאֵל וְאַיִל אֶחָד לַעֲזָאזֵל שֶׁיִּסְבֹּל עֲוֹנוֹתֵיהֶם שֶׁל יִשְׂרָאֵל וְהוּא עֲזָאזֵל שֶׁבַּתּוֹרָה.