He answered:
Praise be to Allah. In these circumstances, this child—the girl—cannot be attributed to him merely on the basis of her claim, according to the unanimous agreement of the imams. Indeed, even if a divorced woman claims to have given birth in circumstances in which the child, if born to her, would be attributed to him, and he denies that she gave birth, her claim to have given birth is not accepted unless she produces evidence establishing it. There is no disagreement on this.
The testimony of one woman suffices according to Abū Hanīfah and the well-known position reported from Ahmad. According to Mālik and another position reported from Ahmad, two women are required. Al-Shāfiʿī requires four women. It suffices for the husband to swear that he does not know that she gave birth to the child.
If, however, the marriage is still in effect, there are two positions within Ahmad’s school. The first is that her statement is not accepted, as in al-Shāfiʿī’s school. The second is that it is accepted, as in Mālik’s school.
If her waiting period has ended and the maximum gestation period has elapsed, and she then claims to be pregnant by the first husband who divorced her, her statement is not accepted, without disagreement. Indeed, if she declares that her waiting period has ended and then gives birth six months or more later, but within the maximum gestation period, is the child attributed to him? The scholars have two well-known positions on this. The position of Abū Hanīfah and Ahmad is that the child is attributed to him. This is also the view adopted by Ibn Surayj, one of al-Shāfiʿī’s followers. However, the well-known position in the schools of al-Shāfiʿī and Mālik is that the child is not attributed to him.
This disagreement applies when she has not remarried. If, however, she marries after declaring that her waiting period has ended, and then gives birth more than six months after that marriage, the child is not attributed to the first husband, without disagreement. Once you understand the imams’ positions on these two principles, how, then, can the child be attributed to him