א הַזְּקוּקָה לְיָבָם שֶׁנִּתְקַדְּשָׁה לְאַחֵר בְּשׁוֹגֵג, נוֹתֵן לָהּ הַזָּר שֶׁקִּדְּשָׁהּ גֵּט, וִיבָמָהּ מְיַבֵּם אוֹ חוֹלֵץ. אִם הָיָה יְבָמָהּ כֹּהֵן, שֶׁאֵינוֹ יָכוֹל לִשָּׂא גְּרוּשָׁה, תֵּצֵא מֵהַזָּר בְּגֵט, כְּדֵי שֶׁלֹּא יְהֵא חוֹטֵא נִשְׂכָּר, וְחוֹלֵץ לָהּ יְבָמָהּ. וְאִם חָזַר הַזָּר שֶׁגֵּרְשָׁהּ מֵהָאֵרוּסִין, וְנָשְׂאָהּ אַחַר שֶׁחָלַץ לָהּ יְבָמָהּ, אֵין מוֹצִיאִין אוֹתָהּ מִיָּדוֹ. הַגָּה: וְיֵשׁ אוֹמְרִים דְּאֲפִלּוּ חָזַר וּנְשָׂאָהּ, מוֹצִיאִין אוֹתָהּ מִיָּדוֹ, הוֹאִיל וְנִתְקַדְּשָׁה לוֹ בְּאִסוּר. וְדַוְקָא אִם קִדְּשָׁהּ בְּמֵזִיד, אֲבָל אִם קִדְּשָׁהּ בְּשׁוֹגֵג, שֶׁלֹּא יָדְעוּ שֶׁהָיָה לָהּ יָבָם, אִם רוֹצֶה הַיָּבָם לְיַבֵּם, צָרִיךְ הַמְקַדֵּשׁ לְגָרְשָׁהּ; וְאִם רוֹצֶה הַיָּבָם לַחֲלֹץ, חוֹלֵץ לָהּ וְנִשֵּׂאת לַמְקַדֵּשׁ, וְצָרִיךְ לַחֲזֹר וּלְקַדֵּשׁ אוֹתָהּ אַחֵר שֶׁחָלַץ לָהּ יְבָמָהּ (ר"ת); וְכֵן נִרְאֶה לִי עִקָּר. וְיֵשׁ אוֹמְרִים דַּוְקָא בְּשׁוֹגֵג גָּמוּר, שֶׁלֹּא יָדְעוּ שֶׁיֵּשׁ כָּאן יָבָם. אֲבָל הָיָה כָּאן יָבָם, אֶלָּא שֶׁהָיָה סְבוּרָה שֶׁמֵּת, כִּי כֵּן יָצָא הַקּוֹל, תֵּצֵא מִן הַמְקַדֵּשׁ (ת"ה סִי' רכ"ב):
1 One connected to a brother-in-law who became betrothed to another by accident -- the outsider who betrothed her gives her a bill [of divorce], and her brother-in-law does levirate marriage or chalitsah. If her brother-in-law was a kohen, who cannot wed a divorcee, she leaves the outsider with a bill [of divorce] so that a sinner not profit [thereby], and her brother-in-law effects chalitsah with her. If the outsider, who divorced her from betrothal, returns and nisu'in -marries her after her brother-in-law has effected chalitsah with her, we do not remove her from him. Comment: And some say that even if he returned and nisu'in -married her, we do remove her from him, since she was betrothed to him illicitly. That [however] is specifically if he betrothed her on purpose, but if he betrothed her by accident -- that they did not know she had a brother-in-law -- [then:] if the brother-in-law wishes to effect levirate marriage, the betrother must divorce her, [but] if the brother-in-law wishes to effect chalitsah, he does chalitsah and she is nisu'in -married to the betrother; and he must betroth her again after her brother-in-law has effected chalitsah (Rabbi Tam). So seems principal to me. And some say [this is] specifically in [a case of] complete accident, that they did not know that there is a brother-in-law present, but if a brother-in-law had been present but it was thought that he was dead -- for so the rumor had spread -- she shall leave the betrother (Torat HaBayit chapter 222).