A key question in understanding gender development concerns the origins of sex segregation. Children’s tendencies to interact with same-sex others have been hypothesized to result from gender identity and cognitions, behavioral compatibility, and personal characteristics. We examined whether prenatal androgen exposure was related to time spent with boys and girls, and how that gendered peer involvement was related to sex-typed activities and gender identity and cognitions. We studied 54 girls with congenital adrenal hyperplasia (CAH) aged 10-13 years varying in degree of prenatal androgen exposure: 40 girls with classical CAH (C-CAH) exposed to high prenatal androgens and 14 girls with non-classical CAH (NC-CAH) exposed to low, female-typical, prenatal androgens. Home interviews and questionnaires provided assessments of gendered activity interests and participation, gender identity, and gender cognitions. Daily phone calls over 7 days assessed time spent in gendered activities and with peers. Girls with both C-CAH and NC-CAH interacted more with girls than with boys, with no significant group differences. The groups did not differ significantly in gender identity or gender cognitions, but girls with C-CAH spent more time in male-typed activities and less time in female-typed activities than did girls with NC-CAH. Time spent with girls reflected direct effects of gender identity/cognitions and gender-typed activities, and an indirect effect of prenatal androgens (CAH type) through gender-typed activities. Our results extend findings that prenatal androgens differentially affect gendered characteristics and that gendered peer interactions reflect combined effects of behavioral compatibility and feelings and cognitions about gender. The study also shows the value of natural experiments for testing hypotheses about gender development.