By eight weeks gestation, all external fetal genitals have the potential to develop into what we think of as female or male genitals. The genitals will become female if testosterone, or a hormone that mimics testosterone, does not interfere. If it does, then the clitoris extends to make a penis and the inner labia wrap around the underside of the penis and fuse to form the penile urethra. The outer labia come together to create the scrotum. The process for the internal sexual organs is similar.
All fetuses start out with precursors of female and male sex organs.
By the third fetal month, if the rudimentary male ducts have not been triggered to mature into testes and vas deferens, they will disappear. The female ducts will then grow and develop into ovaries and a uterus. But this intricate and elegant development of external and internal sexual organs is a journey prone to detours caused by all sorts of influences like maternal hormones, drugs, genetic disposition, environmental hazards, and chance. Sometimes clitorises look more like penises. Sometimes the outer labia on a girl baby fuse into a scrotal-looking sac so her genitals may appear almost indistinguishable from a typical newborn baby boy's.