If the hermaphrodite looks male, then he inherits like a male. If the hermaphrodite appears female, he inherits like a female. Masculinity and femininity are each discerned by certain signs. Before puberty, they are known by the course the urine takes: if he urinates through the male organ, he is male; if he urinates through the female organ, he is female. If he urinates through both, the ruling is based on the one that appeared earlier. After reaching puberty, if he grows a beard, feels attracted to women, or ejaculates in his sleep the way men do, then he is male. If he grows breasts the way women do, or lactates, menstruates, or becomes pregnant, then he is female. In both cases, he is referred to as an "simple" hermaphrodite, since he has been known to be more male or more female. However, if none of these signs have appeared, or if they have appeared but contradict one another, then he is a "complex" hermaphrodite.
Islamic scholars of jurisprudence have differed about how he should inherit:
Abu Hanifa said, "It is supposed that he is male and then supposed that he is female. After this, he is treated as though the worst of the two cases were true. If he were to inherit under one consideration and not inherit under another, he would not be given anything. And if he were to inherit under both considerations, but the inheritance differs, then he is given the lesser inheritance."
Imam Malik, Abu Yusuf, and the Twelver Shia have said, "He takes the average of the male and female inheritance."
Al-Shafii said, "All hermaphrodites are given the smaller of the two inheritances, that is what is certain for both cases."
Ahmad said, "If it is necessary to inspect his condition, then he inherits the lesser of the two inheritances and the rest of it is sent to an Islamic waqf. If it not necessary to inspect the condition, then he takes the average of the male and female inheritance." This last opinion is the best.
The law, however, has adopted Abu Hanifa's opinion. Article 46: "The complex hermaphrodite, who is neither more masculine nor more feminine, inherits the lesser of the two inheritances, and what is left of the inheritance is given to the rest of the heirs."