Ovotesticular

Ovotesticular, ambigonadal or bigonadal is a rare intersex variation in which a person is born with both ovarian and testicular tissue present. An individual can have any combination of internal sex organs (gonads). They may have one ovary and one teste or one or both gonads could be ovotestes (in which both ovarian and testicular tissue is present in the same organ.)

Individuals often also have another form of intersex as well. They commonly also have ambiguous genitalia, but not necessarily always. Usually, one with this variation has ambiguous genitalia that represents an abnormal vagina, however, in some cases they may appear externally male or female, and the variation is not noticed until later in life. The majority are also born with a uterus, regardless of their outward genitals. They may or may not be capable of ovulation and/or spermatogenesis, though most are not.

History
It is unknown when this was first discovered amongst biological humans, however it is a common trait in gastropods (such as snails and slugs.)