pregnancy is a sign of puberty, because Allah the Almighty has established the custom that a child is only created from the fluid of the man and the fluid of the woman. Allah the Almighty says: {So let man observe from what he was created. He was created from a fluid, ejected, emerging from between the backbone and the ribs.} (Surah al-Tariq: 5-7). The Prophet (peace and blessings of Allah be upon him) informed of this in the hadiths. Thus, when she becomes pregnant, it is judged that she reached puberty at the time she became pregnant.
Section: If the emission of semen is found from the phallus of a hermaphrodite (khuntha mushkil), it is a sign of his puberty and that he is a male. If it exits from his genital opening, or if she menstruates, it is a sign of his/her puberty and that he/she is a female. Al-Qadi said: "Neither of these is a sign of puberty; but if both occur, then puberty has been attained." This is the school of al-Shafi'i, due to the possibility that the genital opening from which it emerged is an extra anatomical formation. Our view is that the exit of urine from one of the two openings is evidence of his being a male or a female, so the exit of semen and menstruation is more appropriate as evidence. Once it is established that he is a male by the exit of semen from his phallus, or a female by the exit of menstruation from her genital opening, the attainment of puberty is necessitated. This is because it is impossible for a man's semen to come from a woman, or for menstruation to come from a man, so it serves as evidence for the specific gender. Once that designation is established, it necessarily serves as evidence for puberty, just as it would if the gender were determined before the emission. Furthermore, because it is semen emerging from a phallus, or menstruation emerging from a genital opening, it is a sign of puberty just like the semen emerging from a boy and menstruation emerging from a girl. Additionally, they concede that the occurrence of both together is evidence of puberty, so the occurrence of one of them individually is more appropriate. For their occurrence together implies their contradiction and the negating of their evidentiary value, since it is inconceivable for a valid menstruation and a man's semen to occur simultaneously; thus, one of them must be a surplus discharge from a place other than its source, and neither is more deserving than the other, rendering their evidence null, like two conflicting testimonies, or like urine exiting from both openings. This is in contrast to when one of them is found individually, for Allah the Almighty has established the custom that menstruation exits from the woman's genital opening upon her puberty, and a man's semen exits from his phallus upon his puberty. Therefore, when this is found without a contradictor, it is obligatory...
(22) Surah al-Tariq 5-7.