סימן יח סעיף כ
אִם זֶה הַיּוֹשֵׁב יָשַׁב קוֹדֶם וְאַחַר כָּךְ בָּא זֶה וְעָמַד לְהִתְפַּלֵּל מִצִּדּוֹ אוֹ מִלְּפָנָיו שֶׁנִּמְצָא זֶה הַיּוֹשֵׁב לְאַחֲרָיו אֵין צָרִיךְ לַעֲמֹד, כֵּיוָן שֶׁזֶּה בָּא בִּגְבוּלוֹ. אֲבָל עָמַד לְהִתְפַּלֵּל לְאַחֲרָיו שֶׁנִּמְצָא הַיּוֹשֵׁב לְפָנָיו יֵשׁ לוֹ לִזָּהֵר וְלַעֲמֹד. וְכָל זֶה כְּשֶׁמִּתְפַּלֵּל בְּבֵיתוֹ. אֲבָל אִם מִתְפַּלֵּל בְּבַיִת הַמְיֻחָד לְמִנְיָן קָבוּעַ, וּמִכָּל שֶׁכֵּן בְּבֵית הַכְּנֶסֶת הַמְיֻחָד לְכָל אֶחָד לְהִתְפַּלֵּל שָׁם, אֲפִלּוּ יָשַׁב הוּא קֹדֶם צָרִיךְ לַעֲמֹד, כֵּיוָן שֶׁהַמָּקוֹם מְיֻחָד לִתְפִלָּה לְכָל אִישׁ.
If the seated person was first, and afterwards the other one came to stand and to pray [Shemoneh Esrei] alongside him or in front of him so that the seated person is behind the person [praying], he need not stand, because the second person came into his "territory." However [if the second person] stood to pray [Shemoneh Esrei] behind him so that the seated person is in front of him, he should use discretion and rise.65Although the person who placed himself to pray facing a seated person, acted improperly, yet “discretion” calls upon the seated person not to remain seated. This applies only when he is praying at home, but if he is praying in a house (room) assigned to a regular minyan,66E.g., a place of business where people gather regularly to pray as a minyan. and certainly in a synagogue that is designated for everyone [equally] to pray there even if he was seated first he should rise since the place is designated for prayer to everyone.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)