The Medrash tells us that Haman aroused strong accusations in Shomayim against Klal Yisroel (Esther Rabbah 7:14).
The Megillah states: ובמלואת הימים האלה עשה המלך לכל העם הנמצאים בשושן הבירה למגדול ועד קטן משתה שבעת ימים בחצר גנת ביתן המלך - “And when these days were fulfilled, the king made a seven-day feast for all the people who were present in Shushan the capital, great and small alike, in the courtyard of the garden of the king’s palace” (Esther 1:5).
The word העם, the people, mentioned in the pasuk refers to Klal Yisroel. We know that the Jews are referred to as עם, as the Torah states: אשריך ישראל מי כמוך עם נושע ב ה' מגן עזרך – “Fortunate are you, O Yisroel: Who is like you! O people delivered by Hashem, the Shield of your help” (Devorim 33:29).
Haman educated Achashveirosh that the G-d of the Jews despises immorality and promiscuity. He advised him to throw a party for the Jews of Shushan, and to provide them with ample food, drink, and harlots. Entice the Jews and get them to sin. Give them whatever they want: לעשות כרצון איש ואיש, according to each man’s pleasure (Esther 1:8).
Mordechai saw what was being planned and decreed that no Jew may participate in Achashveirosh’s party. He warned that the king’s intention was to induce Klal Yisroel to sin. The outcome would be a kitrug against Klal Yisroel and would result in severe and swift judgement against the Jews.
Tragically, eighteen thousand five hundred Jews did not listen, and they willingly enjoyed themselves at the party. They ate, drank, became inebriated, and succumbed to sin.
The Sotan stood before Hashem, and presented the facts as described. He asked Hashem how long he was willing to put up with such disregard for his Torah and mitzvos. He advised Hashem to destroy the Jewish nation, since they sinned and did not do teshuvah.
Hashem responded, “What will be with the Torah?”
The Sotan advised Hashem that the Torah will remain in the heavens, and no longer needed to be studied or retained on this world.
Hashem consented to the Sotan’s argument. He instructed the Sotan to provide Him with a surface on which to write the decree to annihilate the Jews. The Sotan brought a Megillah, and Hashem wrote the decree.
The Torah donned mourning garments, sat before the Ribbono Shel Olam, and wept. The malachim cried as well, exclaiming, “Ribbono Shel Olam, if the Jews are wiped out, what purpose is there for us to exist?”
The sun and the moon heard the cries of the angels, and they ceased to provide light to the world.
Eliyahu HaNavi, immediately ran to the Avos, Avraham, Yitzchak, and Yaakov. He ran to Moshe Rabbeinu. He beseeched them to take heed of the threat hanging over Klal Yisroel. He informed them that the angels, the sun, and the moon were all weeping at the prospect of the destruction of Klal Yisroel.
When Avraham, Yitzchak and Yaakov were appraised that the Jews had in fact sinned, the Avos recognized that the Jews deserved punishment, and responded that there was nothing that they could do to save them.
Eliyahu turned to Moshe Rabbeinu, the shepherd of Klal Yisroel, who had successfully come to their defence many times in the past and implored him to once again come to the defence of Klal Yisroel.
Moshe asked if there was any tzaddik among them who was slated to be killed. When he learned of Mordechai HaTzaddik, Moshe advised Eliyahu to instruct Mordechai to daven on behalf of Klal Yisroel and told him that he would do the same from his place in Shomayim. The combination of their tefillos would save the Jews.
Eliyahu HaNavi wasn’t convinced that this would be effective. Hashem had already written and signed the decree of destruction. As the decree had been set in motion, there was no way to rescind it. Moshe Rabbeinu responded that the finality of the decree was dependant on the form of signature Hashem had applied. If He signed the edict in cement, then it could still be changed. Our tefillos can affect the change we need and Klal Yisroel can be saved. If, however, Hashem had signed the decree in blood, then there was no way to change the decree.
Eliyahu HaNavi informed Moshe Rabbeinu that the decree was written in cement, not in blood. Moshe was then confident that his prayers would be able to join forces with those of Mordechai and save the Jewish people from annihilation. Eliyahu then told Mordechai to daven, and therein lay the seeds of redemption, as his prayers merged with those of Moshe. The tefillos that saved Klal Yisroel can be attribute to the efforts of Eliyahu HaNavi, who aroused Moshe Rabbeinu, and then served as a messenger to convey this message to Mordechai.