When the fifteenth of Adar falls on Shabbat, Purim is celebrated over a three-day period in the "walled" cities [Jerusalem and Shushan]. Other cities fulfill all of the obligations of Purim on Friday, the fourteenth. Those who are obligated to celebrate Purim on the fifteenth, however, divide the obligations over the period between the fourteenth and sixteenth. How is this done?

The mitzvot of reading the Megillah and giving gifts to the poor are fulfilled on the fourteenth, as in the other cities. On Shabbat, the fifteenth, a second Torah scroll is taken from the Sanctuary and the portion from the parsha of Beshallach that tells of the war with Amalek is read. The Al ha-Nissim prayer is added to the Amidah and the Grace after Meals. On Sunday, the sixteenth, the festive meal is held and gifts of food are sent to friends.

Why was it decided to fulfill the mitzvot of Purim in this manner?

Although the Megillah should be read in the "walled cities" on the fifteenth, the Sages prohibited the reading of the Megillah on Shabbat, lest the Megillah scroll be inadvertently carried in the public domain by people seeking someone capable of reading it for them,a violation of the laws of Shabboat. When then was the reading not delayed until Sunday, the sixteenth? The Sages deduced from specific verses of the Megillah that when the reading cannot be done at its proper time, it should be read earlier than required rather than later. [This is in contradiction to other Rabbinic obligations, e.g., the fast of Tishah b'Av, which are fulfilled later, if the time for their fulfillment falls on Shabbat. The verse in the Megillah states: “And these days of Purim shall not pass” (Esther 9:27) ﷓ that is, we are not permitted to allow the days of Purim, the fourteenth and fifteenth of Adar, to pass without our having observed the mitzvah, but we are permitted to do so earlier than required.

The mitzvah of eating the festive Purim meal is delayed until the sixteenth [even though it could theoretically be fulfilled on Shabbat, the fifteenth] because of our tradition that we do not mix one celebration [in this case Shabbat] with another [in this case the Purim meal].

The giving of gifts to the poor and the exchange of mishlo'ach manot between friends cannot be fulfilled on Shabbat, again because we fear that doing so might lead one to inadvertently carry in the public domain. The former obligation is moved to the fourteenth, so that the poor might enjoy their gifts as early as possible. The latter obligation is delayed until the sixteenth since the verse in the Megillah, from which we deduce that we do not allow the days of Purim to pass, does not refer to the mitzvah of exchanging gifts. Additionally, by delaying its fulfillment until the sixteenth of Adar, we establish a noticeable difference between the celebration of Purim in the walled cities and in other cities.

Although the mitzvah of reading the Megillah can be fulfilled without a minyan, when this mitzvah is fulfilled earlier than required [i.e., when the fifteenth falls on Shabbat and the residents of the walled cities move the reading to the fourteenth] it is customary to read only in the presence of a minyan. This also applies to the reading of the Megillah for women; i.e., it should be read in the presence of ten women.

Although the sending of mishlo'ach manot is delayed until the sixteenth, it is nevertheless customary for the residents of walled cities to send a few to friends on the fourteenth. It is also traditional to make the Shabbat meal more elaborate than usual, in honor of Purim. It is customary for the residents of the walled cities to dress in festive clothing en the sixteenth to indicate that they are celebrating Purim. As noted, the A1 ha-Nissim prayer is recited on Shabbat, the fifteenth, and is not recited on the sixteenth, neither in Shemoneh Esreh nor in the Grace after Meals.