The Purim of Saragossa was established in the year 1440, fifty- two years before the Jews were exiled from Spain. In the city of Saragossa, Spain, the Jews were ordered to appear at a public reception honoring the king with all of the Torah scrolls of the community.
The rabbis of the community decided that it would be safer to remove the Torahs from their cases, and were sure that the king would never know the difference.
Unfortunately, there was a Jew in the community named Marcos who was a rebel and a troublemaker. He went to the authorities and betrayed the rabbis' plan, citing the Jews' disrespect for the king as the reason for not bringing the actual scrolls.
The king was furious at this slight and ordered the Jews to open the cases at once. A terror fell upon all the Jews, for the punishment for disobeying the king was the most severe, but they had no choice but to open the cases. They were completely amazed and dumbfounded when they saw that all of the cases contained Torah scrolls.
What they could not have known was that the previous night, the caretaker of the synagogue had a dream in which the prophet Elijah appeared to him and ordered him to replace the scrolls in their cases. The dream was so vivid that the caretaker did as he was instructed, but he had no time to inform the rabbis of his action.
The king saw that the Jews were innocent; the accusation was baseless. He ordered the informer put to death for his false accusation. To commemorate their redemption, the rabbis established a special Purim to be celebrated throughout the generations on the 17th and 18th of Shevat.