if she gives birth to him after half a year has passed from the time intercourse became possible, or within less than four years from the time he divorced her irrevocably, provided that he is of an age at which a child can be born to someone like him, such as a ten-year-old.
His statement, “if she gives birth to him after half a year has passed from the time intercourse became possible, or within less than four years from the time he divorced her irrevocably, provided that he is of an age at which a child can be born to someone like him, such as a ten-year-old”: the author stipulated two conditions:
First: the husband must be of an age at which he can father a child—namely, ten years old. This is possible, though rare. If he is nine years old and has intercourse with his wife and she bears a child, they say that the child cannot be attributed to him, because he is not of an age at which he can father a child. But one who is ten years old may father a child. It is said that there were eleven years between Abdullah ibn Amr ibn al-As and his father, and al-Shafi‘i, may Allah have mercy on him, said: “I saw a grandmother who was twenty-one years old.”
Second: she must give birth after half a year has passed from the time intercourse became possible, even if it is not established that he actually had intercourse with her. For example, if he married a woman in the same town but did not consummate the marriage, and she gave birth to a child after half a year had passed from the time intercourse became possible—although he had not consummated the marriage—and the child survives, then the child belongs to the husband, because it is possible that he had been alone with her, in which case the child would be his.
If she gives birth before half a year has passed and the child survives, then the child does not belong to him, because the shortest gestation period in which a child can survive is six months. The evidence is Allah’s saying: “His gestation and weaning take thirty months,” [al-Ahqaf: 15] and His saying: “His weaning is in two years,” [Luqman: 14]. Subtract the two years from the thirty months, and six months remain for gestation. Accordingly, if she gives birth in less than six months and the child survives, the child is not his. Ibn Qutaybah mentioned in his book al-Ma‘arif that Abd al-Malik ibn Marwan—one of the greatest caliphs—was born after six months.