Yevamos2: 1
כֵּיצַד אֵשֶׁת אָחִיו שֶׁלֹּא הָיָה בְעוֹלָמוֹ? שְׁנֵי אַחִים, וּמֵת אַחַד מֵהֶם, וְנוֹלַד לָהֶן אָח, וְאַחַר כָּךְ יִבֵּם הַשֵּׁנִי אֶת אֵשֶׁת אָחִיו, וָמֵת — הָרִאשׁוֹנָה יוֹצֵאת מִשּׁוּם אֵשֶׁת אָחִיו שֶׁלֹּא הָיָה בְעוֹלָמוֹ, וְהַשְּׁנִיָּה מִשּׁוּם צָרָתָהּ. עָשָׂה בָהּ מַאֲמָר, וָמֵת — הַשְּׁנִיָּה חוֹלֶצֶת וְלֹא מִתְיַבֶּמֶת.
How does the wife of his noncontemporaneous brother [release her co-wives]? [There were] two brothers, one of whom died, and [then another] brother was born; subsequently, the second one performed yibum with his brother's widow and died —- the first is discharged as the wife of his noncontemporaneous brother, and the second as her co-wife. [If] he performed maamar with her and then died —- the second requires chalitzah but may not be taken in yibum.