The fourth perek of Massekhet Megilla focuses on the synagogue. Batei Knesset as places of prayer existed even while the Temple was still standing. In fact, on the Temple Mount itself there was a synagogue where people would participate in communal prayer and public Torah reading while the sacrificial service was being performed by the kohanim in the mikdash. The community synagogue served other functions as well, including a schoolhouse for children and a gathering place for members of the community to hear the teachings of the Rabbis or to deal with communal issues such as charity. Our perek examines the holiness invested in these structures, what appropriate behavior in them should be, how they should be treated when they fall into disuse, and whether they can be sold or traded.
The first Mishna teaches that an object of kedusha – holiness – can only be sold if something with a higher level of kedusha will be purchased with the proceeds. Rava teaches, however, that if the community leaders – the shiv’a tovei ha’ir – arrange the sale of a synagogue with the approval of the community, it can even be used le-mishta bei shikhra – to drink beer.
According to Rashi and Rabbeinu Hananel, this ruling permits the funds received by the community in exchange for the synagogue to be used for any purpose – even for purchasing beer. Rabbeinu Yehonatan, the Ran and others have a variant reading in the Gemara. They read it as le-mishta ba-hen shikhra – to drink beer in them – which would seem to mean that once the synagogue is sold properly, it can be used for any purpose, even as a beer hall.
After serious examination of the rulings presented by the Gemara on this topic, the Ramban concludes that a synagogue does not contain inherent holiness; rather, the kedusha that is invested therein stems from its use as a place of study and prayer. Once the building has been sold in a manner accepted by the Sages and it is no longer being used for such purposes, the holiness is no longer extant and it can be used for any purpose.