Esther 5-10
Queen Esther devised a plan, and invited the king and Haman to a great dinner. At that dinner she asked that the king and Haman come again to a banquet the following evening, which was then planned. That very night the king couldn’t sleep, so he had some history of the kingdom read to him, and discovered that Mordecai had saved his life, so the next morning he had Haman give honor to Mordecai throughout the streets of the Capitol city of Susa (this galled Haman to no end). Haman had a gallows built, and planned to hang Mordecai on it the next day.
When the king and Haman went again to the banquet set by Esther, she revealed to the king the plan of genocide that Haman had made against the Jews, which included herself, and she begged the king to stop it. Haman was exposed as the villain that he was, and the king had him hung on the same gallows intended for Mordecai, and then promoted Mordecai to the place Haman vacated.
On the appointed day in the 12th month, the king allowed the Jews to defend themselves, and they were rescued from the genocide that was intended on them by the enemies of Israel. Because of this rescue, the 14th day of Adar, which generally corresponds to March on our calendar, was set aside as a day of celebration, which is called Purim, and celebrated annually to this day.