There is a unique halakha pertaining to Purim: it has two dates. In most places, Purim is celebrated on the fourteenth of Adar, while in cities that were surrounded by a wall at the time of Yehoshua bin Nun, and in Aĥashverosh’s capital city of Shushan, it is celebrated on the fifteenth.
In order to understand the reason for this distinction, we must first recall the order of events. Haman’s decree stated that on the thirteenth of Adar all the enemies of Israel could destroy, massacre, and exterminate all the Jews throughout the world. This decree was not abolished even after Mordechai and Esther’s amazing rise to power, because by law any decree written in the king’s name and sealed with the king’s signet could not be revoked. Therefore, the only thing they could do was to issue an additional edict, also sealed with the king’s signet, allowing the Jews to defend themselves and kill their enemies.
Until the thirteenth of Adar, it was unclear how matters would develop. Granted, the Jews had permission to defend themselves without interference from the Persian army, but who knew if they would succeed in defeating their enemies? Then, on the thirteenth of Adar, fear of the Jews fell upon the people of the land, and the Jews were able to defeat their enemies. On the next day, the fourteenth of Adar, the Jews rested from battle, making it a day of feasting and joy. In the capital city of Shushan, however, there were so many enemies of Israel that the Jews were unable to kill them all in one day. Therefore, Queen Esther came before King Aĥashverosh and asked him to grant the Jews permission to take revenge against their enemies for one more day. Once he agreed to Esther’s request, the Jews of Shushan continued eradicating their enemies on the fourteenth of Adar and rested on the fifteenth, making it a day of feasting and joy.
Since the first Purim was celebrated on two separate days, the Sages perpetuated this feature with their enactment. Therefore, in most places, Purim is celebrated on the fourteenth of Adar, whereas in Shushan, where the miracle was greater because all the events of the Megilla occurred there, and because the Jews took revenge against their enemies there for two days, Purim is celebrated on the fifteenth. The Sages also enacted that in all prominent cities like Shushan, Purim should be celebrated on the fifteenth, and the indicator of a city’s prominence is having a wall, like Shushan did.
At that time, however, Eretz Yisrael was in ruins, and if they had based their observance of the enactment on the state of cities at that time period, there would not be one city in all of Eretz Yisrael whose residents would celebrate Purim on the fifteenth of Adar, because none of them was walled at the time. Therefore, in honor of Eretz Yisrael, the Sages decided that in all cities that were surrounded by a wall at the time of Yehoshua bin Nun, Purim would be celebrated on the fifteenth of Adar, even if they were currently in ruins, while in all other cities, Purim would be celebrated on the fourteenth. The only exception is Shushan, as even though the city was established after Yehoshua’s time, Purim is celebrated there on the fifteenth, since the miracle occurred there.
Today, Jerusalem is the only city in which Purim is celebrated on the fifteenth of Adar, because it is the only place about which we have a clear tradition that it was surrounded by a wall at the time of Yehoshua bin Nun. Regarding some cities it is uncertain whether or not they were walled at that time. There is even uncertainty about Shushan’s exact location. We will elaborate on these laws in chapter 17.
Rav Kook explains, in Mitzvat Re’iyah, oĥ 688:1, that the Sages instituted two days of Purim in order to differentiate between Torah commandments, whose times are fixed for everyone, and rabbinic laws, which can have two times, depending on one’s location. Perhaps this is also why they established different levels of embellishment (mehadrin) with regard to lighting the Ĥanuka candles. And since we find that the Torah distinguishes between walled and unwalled cities (Vayikra 25:29; Kelim 1:7), the Sages made this same distinction on Purim. Furthermore, since all Torah laws relating to walled cities apply only in Eretz Yisrael, they established Purim according to when these laws began to take effect, namely, when the Israelites entered the land at the time of Yehoshua bin Nun. See Mitzvat Re’iyah, loc. cit., where R. Kook elaborates on the matter.