סימן ה סעיף י
מִי שֶׁהִתְפַּלֵּל וּמָצָא אַחַר כָּךְ שֶׁיֶּשׁ שָׁם צוֹאָה, אִם הַמָּקוֹם הַהוּא הָיָה רָאוּי לְהִסְתַּפֵּק בּוֹ שֶׁמָּא יֶשׁ שָׁם צוֹאָה וְהוּא פָשַׁע וְלֹא בָדַק, כֵּיוָן שֶׁתְּפִלַּת שְׁמוֹנֶה עֶשְׂרֵה הִיא בִמְקוֹם קָרְבָּן, הֲוָה לֵהּ זֶבַח רְשָׁעִים תּוֹעֵבָה, וְצָרִיךְ לַחֲזֹר וּלְהִתְפַּלֵּל שְׁמוֹנֶה עֶשְׂרֵה. וְכֵן קְרִיאַת שְׁמַע שֶׁהִיא מִדְּאוֹרָיְתָא וְאֵין בָּהּ חֲשַׁשׁ בְּרָכָה לְבַטָּלָה, חוֹזֵר וְקוֹרֵא, אֲבָל בְּלֹא הַבְּרָכוֹת. וְכֵן שְׁאָר בְּרָכוֹת שֶׁאָמַר שָׁם, וַאֲפִלּוּ בִרְכַּת הַמָּזוֹן, אֵינוֹ חוֹזֵר וּמְבָרֵךְ. וְאִם אֵין הַמָּקוֹם רָאוּי לְהִסְתַּפֵּק בְּצוֹאָה, שֶׁאָז לֹא פָשַׁע, אֲפִלּוּ בִתְפִלָּה יוֹצֵא בְדִיעֲבַד. וְאִם נִמְצְאוּ מֵי רַגְלַיִם, אֲפִלּוּ הַמָּקוֹם רָאוּי לְהִסְתַּפֵּק יוֹצֵא בְדִיעֲבַד גַּם בִּתְפִלָּה (סִימָּן ע"ו קפ"ה ובנ"א).
If you prayed and later found that the place contained excrement—10Within four amohs if it was a place that should have been inspected for possible excrement and you neglected to inspect it, since the prayer of the Shemoneh Esrei is in place of a Sacrificial offering, this Scriptural verse is applicable, "The sacrifice of the wicked is abominable"11Proverbs 21:27. and you are therefore required to repeat the Shemoneh Esrei. Similarly, in regard to Shema which is a Biblical command; since there is no problem of reciting a berachah in vain you must again recite the Shema, without the berachos.12According to Mishnah Berurah, you should repeat the berachos. Likewise other berachos recited there, and even the Birkas Hamazon, need not be repeated.13According to Mishnah Berurah you should repeat the Birkas Hamazon. If the place is one that did not require inspection for excrement, you are not considered negligent, and even in regard to Shemoneh Esrei your obligation is fulfilled. If urine is found, even in a place where its existence should have been suspect, your obligation is fulfilled even in regard to Shemoneh Esrei.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)