(דברים יג,ה) את מצותיו תשמרו ובקלו תשמעו ואתו תעבדו ובו תדבקוןתיראו ו יכם תלכו ואתוקאל 'חרי הא
We are commanded to go in the way of HaShem. The standard understanding is that we should embrace His ways: engage in kindness, bury the dead, and visit the sick, etc. However, the Gemara provides an additional understanding of the verse.
Sotah 39b: (R. Tanchum stated in the name of Rabbi Yehoshua ben Levi): The Tzibur may not leave until the Torah is taken (and put in its place - it seems that these words should be deleted). (Shmuel): They must wait until it leaves. They do not argue. R. Tanchum discusses when there is more than one exit (one may leave from a different exit before the Sefer Torah leaves). Shmuel discusses when there is only one exit. (Rava): Bar Ahina explained the source of Shmuel's law - "you will go after HaShem."
Orach Chaim Chapter 149 details this law. The Pri Megadim offered eight opinions in the understanding of the words of the Gemara and how it is applied in actual deed including these:
- Rashi as developed by the Bais Yosef: The Torah is actually “stored” in a secure place not in the Bais haKenesses (the place where the minyan reads the Torah). Thus, after the Torah is read it is carried away from that room back to the other “secured” location. Rabbi Yehoshua ben Levi says it is not permitted to leave until the Sefer Torah is removed from the bimah (place of reading). However, once it is removed (even though still in the room) then one is permitted to leave the room. Shmuel maintains that one cannot leave the room until the Sefer Torah leaves the room. And the Gemara explains that they do not argue when the room has only one exit. However, they do argue when there are two or more exits that Shmuel permits leaving from an exit that the Sefer Torah will not exit in the future. This implies that when the Torah is stored in the same room then one is permitted to leave prior to the return of the Sefer Torah, since one is not shaming the Sefer Torah by leaving.
- Bach: He adds on to Rashi’s explanation saying that when the Sefer Torah is being transported to another room, then everyone is obligated to accompany the Sefer Torah until it is returned to its place, per the plain understanding of the verse. However, if the Sefer Torah is stored in the shuel where one is praying, once the reading of the Sefer Torah is finished one may leave.
- Saadyah Gaon: Rabbi Yehoshua ben Levi makes no distinction whether the Sefer Torah is transported to another room or stored in the room of prayers; no one is allowed to leave until the Sefer Torah is removed from the “reading” bimah. After that time, people are allowed to leave, even though the Sefer Torah has not been “stored” yet. Shmuel permits people to leave only from a different door than the one the Sefer Torah is destined to leave.
- Pri Megadim: Rabbi Yehoshua ben Levi does not allow anyone to leave until the Sefer Torah is returned to its place. However, Shmuel is lenient when the Sefer Torah leaves the room to be stored elsewhere, then one may leave.
According to the Halacha
Mechaber: One is not permitted to leave until the Sefer Torah is returned to its place.
Rema: Adds that all that is involved with the reading (and hearing) the Sefer Torah, must accompany the Sefer Torah to its place.
Kaf haChaim: The custom is to accompany the Sefer Torah for a little amount. Perhaps if everyone would accompany the Sefer Torah, it might become crowded and if any pushing resulted it might lead to lack of proper honor to the Sefer Torah.
A proper custom is to kiss the Sefer Torah when being returned to its place.
Shaarei Efraim: It is best to kiss with the mouth per the verse ישקני מנשיקות פיהו (Shir HaShirim 1,2). If not able to kiss with the mouth, then kiss with the hand.
Pischei Shaarim: The custom to kiss with the hand has a source and should not be mocked.
Yesod and Shoresh haAvodah in the name of the Ari z”l: One should not kiss with the hand.
