ב כְּשֶׁאֵרַע מַעֲשֵׂה אַמְנוֹן וְתָמָר, גָּזַר דָּוִד וּבֵית דִּינוֹ עַל יִחוּד פְּנוּיָה. וְאַף עַל פִּי שֶׁאֵינָהּ עֶרְוָה, בִּכְלַל יִחוּד עֲרָיוֹת הִיא. וְשַׁמַּאי וְהִלֵּל גָּזְרוּ עַל יִחוּד כּוּתִית. נִמְצָא, כָּל הַמִּתְיַחֵד עִם אִשָּׁה שֶׁאָסוּר לְהִתְיַחֵד עִמָּהּ, בֵּין יִשְׂרְאֵלִית בֵּין כּוּתִית, מַכִּין אֶת שְׁנֵיהֶם מַכַּת מַרְדּוּת, הָאִישׁ וְהָאִשָּׁה, וּמַכְרִיזִין עֲלֵיהֶם. הַגָּה: וְדַוְקָא בְּיָדוּעַ שֶׁנִּתְיַחֵד עִמָּהּ, אֲבָל הִיא אֵינָהּ נֶאֱמֶנֶת עָלָיו (רִיבָ"שׁ סִי' רס"ה). וַאֲפִלּוּ עֵד אֶחָד אֵינוֹ נֶאֱמָן (מַהֲרִי"ק שֹׁרֶשׁ קפ"ט). וּמִכָּל מָקוֹם בְּמָקוֹם שֶׁנִּרְאֶה לְבֵית דִּין דְּאִכָּא לְמֵיחַשׁ לְאִסוּרָא, צָרִיךְ לְהַפְרִישָׁן (שָׁם בָּרִיבָ"שׁ). חוּץ מֵאֵשֶׁת אִישׁ, שֶׁאַף עַל פִּי שֶׁאָסוּר לְהִתְיַחֵד עִמָּהּ, אִם נִתְיַחֵד אֵין לוֹקִין, שֶׁלֹּא לְהוֹצִיא לַעַז עָלֶיהָ שֶׁזִּנְּתָה, וְנִמְצָא מוֹצִיאִין לַעַז עַל בָּנֶיהָ שֶׁהֵם מַמְזֵרִים:
2 After the episode of Amnon and Tamar, David and his court forbade seclusion with an unmarried woman. Even if she is not forbidden as an "ervah" (person with whom sexual relations are forbidden), it is still considered as seclusion with a forbidden sexual partner. Shammai and Hillel forbade seclusion with idol-worshippers (non-Jews). Therefore, anyone who is in seclusion with a woman with whom seclusion is forbidden, whether Israelite or idol-worshipper, [the court] administers lashes of rebellion (makat mardut - Rabbinically sanctioned lashes) to both, the man and the woman, and the punishment is publicized. Rema: [We administer lashes] only if it is known that he secluded with her, but her testimony alone is not sufficient [to convict him] (Rivash chapter 265). Even a single witness is not believed (Maharik root 189). Nevertheless, when the court has reason to believe that there was a transgression, it is necessary to separate them (Rivash ibid.). However, with a married woman, even though it is forbidden to be secluded with her, if one did so, they do not administer lashes so as not to spread rumors that she had relations (with him), which would lead to rumors that her children are mamzerim (the products of a sexually forbidden union).