He—may Allah have mercy on him—was asked:
An enslaved woman was married, and her husband went away on a journey. Her master sold her, stipulating that she was married. She stayed with her purchaser for several days; then, as death approached him, he freed her. She subsequently married another man, who did not know that she already had a husband.
When her first husband returned from his journey, the master who had sold her gave him the marriage document, which recorded a valid marriage contract under Islamic law. Which marriage contract is valid—that recorded in the first husband’s document, or the second husband’s?
He answered:
If the first husband married her in a manner valid under Islamic law—whether according to Abū Hanīfah’s view that a free man’s marriage to an enslaved woman is valid, or according to the view of Mālik, al-Shāfiʿī, and Ahmad, on condition that he lacked sufficient financial means and feared falling into sexual sin—then her emancipation does not invalidate his marriage to her. Rather, she remains his wife after being freed.
However, according to one report from Abū Hanīfah, she has the right to annul the marriage. She may therefore annul it and, after completing the waiting period following its annulment, marry someone else if she wishes. According to Mālik, al-Shāfiʿī, and the well-known position reported from Ahmad, she has no such choice; rather, she remains his wife.
If she marries before the marriage has been annulled, her new marriage is invalid by agreement of the imams. If, however, her first marriage was invalid, the two must be separated, and she may marry whomever she wishes after the waiting period has ended.