There is considerable evidence that human sexual orientation is genetically influenced, so it is not known how homosexuality, which tends to lower reproductive success, is maintained in the population at a relatively high frequency. One hypothesis proposes that while genes predisposing to homosexuality reduce homosexuals' reproductive success, they may confer some advantage in heterosexuals who carry them. However, it is not clear what such an advantage may be. To investigate this, we examine a data set where a large community-based twin sample (N=4904) anonymously completed a detailed questionnaire examining sexual behaviors and attitudes. We show that psychologically masculine females and feminine men are (a) more likely to be nonheterosexual but (b), when heterosexual, have more opposite-sex sexual partners. With statistical modelling of the twin data, we show that both these relationships are partly due to pleiotropic genetic influences common to each trait. We also find a trend for heterosexuals with a nonheterosexual twin to have more opposite-sex partners than do heterosexual twin pairs. Taken together, these results suggest that genes predisposing to homosexuality may confer a mating advantage in heterosexuals, which could help explain the evolution and maintenance of homosexuality in the population.