Midrash for Berakhot 9:4
הַנִּכְנָס לִכְרַךְ מִתְפַּלֵּל שְׁתַּיִם, אַחַת בִּכְנִיסָתוֹ וְאַחַת בִּיצִיאָתוֹ. בֶּן עַזַּאי אוֹמֵר, אַרְבַּע, שְׁתַּיִם בִּכְנִיסָתוֹ וּשְׁתַּיִם בִּיצִיאָתוֹ, וְנוֹתֵן הוֹדָאָה לְשֶׁעָבַר, וְצוֹעֵק לֶעָתִיד לָבֹא:
One who enters a town utters two prayers, one upon entering and one upon leaving. Ben Azzai says: Four, two upon entering and two upon leaving. [When he is about to enter he says: "…that You lead me into this town in peace." Once he has entered, he says: "I give You thanks for having led me into this town in peace" — two upon entering. When he is about to leave, he says: "…that You lead me from this town in peace." Once he has left, he says: "I give You thanks for having led me from this town in peace."] And he gives thanks for the past and cries out for the future. [Why all this? For one must give thanks to his Creator for the good that he has experienced and he must pray for good in the future.]
Explore midrash for Berakhot 9:4. In-depth commentary and analysis from classical Jewish sources.