Reference: al-Fataawa al-Muta’alliqah bit-Tibb wa Ahkaam al-Mardhaa – Page 303
Question: Is a hermaphrodite to be treated as a female, bearing in mind his affair has not yet become clear (i.e. is he a male or a female)? And are all the rulings which are applicable to a woman [likewise] applicable to him?
Response: Regarding a hermaphrodite, there is some explanation [required].
Before attaining puberty there is some doubt [as to whether] he is a male or female, because he has two [sexual] organs – a female organ and a male organ. However, in most cases, after attaining puberty his masculinity or femininity becomes apparent.
So, if there appears [upon him] that which indicates he is a woman, such as the growing of both his breasts, or that which distinguishes him from the men such as the coming on of menses, or [even] urinating from the female organ, then [in this case] he is to be regarded as a woman and [as such] his male organ is to be surgically removed with care.
And if there appears [upon him] that which indicates he is a man, such as the growing of the beard and urinating from the male organ and other than that which the doctors are aware of, then [in this case] he is to be regarded as a man.
[Importantly] before all of this, he is to remain [in a state of ambiguity] until his affair becomes apparent; So he is not to be married off until it is apparent he is [clearly] a man or a woman. And this occurs after attaining puberty as the scholars have stated.