Across cultures, between 2% and 5% of men are gay. That amounts to an evolutionary paradox: gay men have fewer children, so one would expect that the trait would disappear over time. But it hasn’t.

Now a team of researchers has carried out the largest-ever genetic study of sexual orientation and found evidence consistent with one possible explanation. The very same genetic factors that predispose people to being gay may also, when heterosexuals have them, lead to more sexual partners and greater “mating success.”

Details of the unpublished study have been described in a public research plan, in two scientific abstracts, and by researchers at a scientific meeting held in June at the Broad Institute, a genome research center in Cambridge, Massachusetts.

The hunt for sexual orientation genes—which wades into the polarizing question of whether people are born gay or become so—is part of a boom in genomics research that aims to unveil how genes shape behavior, not just diseases.

Powering the new social genetics are huge databases, including the British government–funded UK Biobank and the DNA of millions of customers collected by 23andMe, a consumer gene testing company. Scientists have begun using this mass of data to successfully probe the genetic basis of a surprising range of behaviors, from smoking to insomnia, intelligence, marijuana use, and even time spent watching television.

The research is at its most sensitive when it touches on sexual orientation. Jeffrey Reid, who is head of genome informatics at Regeneron Pharmaceuticals, and who is gay, says he is concerned about how such discoveries are discussed in the press. That could have an outsize impact on already vulnerable people, he says.

Have you ever had sexual intercourse with someone of the same sex?

“Supposedly ‘clear evidence’ of a genetic basis for homosexuality may lead a parent to deem their gay son irrevocably broken and eject him from their life,” Reid says. “Alternatively, maybe some evidence of a genetic basis of homosexuality may lead a parent to embrace their child as God made them, or lead someone struggling out of darkness and into self-acceptance.”

Because the work could be controversial, the team behind the new gene hunt opted to post their research plan online in 2017. They described their intent to perform a genome-wide association study, a technique originally developed to locate genetic susceptibilities to diseases like macular degeneration and diabetes.

But instead of scouring for associations between people’s illnesses and features of their genomes, they would carry out a vast statistical analysis comparing the DNA of hundreds of thousands of people with information about their sexual behavior.

It’s already well known that being gay is partly genetic—as in all other behaviors, genes play a role. Yet earlier attempts to identify specific genes involved were, by and large, unsuccessful. That’s mainly because there wasn’t enough genetic data available. The new study is about 10 times larger than any previous effort.

“With these large sample sizes, we are finally discovering things we can actually kind of count on being true,” says Michael Bailey, a psychologist at Northwestern University who studies sexuality.

Ms. Tech

The search was two-pronged. First, the team used DNA data on more than 300,000 heterosexuals who had disclosed in a survey how many sex partners they’d had. Then, to find genes linked to what the researchers call “non-heterosexual behavior,” the team also identified about 28,000 people who had answered yes to the following survey question: “Have you ever had sexual intercourse with someone of the same sex?”

According to a presentation by team member Robbee Wedow of the University of Colorado in June, the researchers located four positions in men’s genomes that were statistically correlated with their ever having had gay sex, and about 40 correlated with whether heterosexuals had had more or fewer sex partners.

“This is not saying that someone is going to be heterosexual or not—it’s really saying there is going to be a slightly higher or a slightly lower chance,” Benjamin Neale, a geneticist at the Broad Institute and one of the study’s leaders, said during MIT Technology Review’s EmTech conference in September.

When it comes to explaining who is gay, though, Bailey says the study is “not ideal.” That’s because it relies on people’s self-reported sexual history. This may be too broad, says Bailey: the researchers may have categorized people willing to experiment sexually along with those who consider themselves gay.

According to Wedow’s presentation, the team had less success finding genetic links among women who’d had sex with women. That could mean they need a still larger number of volunteers, or it could reflect the failure of the study’s design to capture the nuances of people’s sexual behavior.

Nevertheless, the researchers used the results to address the question of why homosexuality is relatively common. One possible explanation for why it is, they say, is that the same genetic factors also give a reproductive advantage to straight people who have them.

According to an abstract the team submitted to the American Society for Human Genetics, whose annual meeting is under way this week in San Diego, the DNA signals linked to gay sexual experiences also appeared more often in straight men who had a larger number of sex partners. The team also notes that straight men with the gay-linked variants were, on average, judged more “physically attractive” than others (the researchers decline to say who did the judging). This, the scientists conclude, could mean that these variants also “confer a mating advantage to heterosexual carriers.”

Such trade-offs are a fact of evolution. For instance, gene variants that can cause sickle-cell anemia also lend protection against malaria. The resulting balance means the sickle-cell gene doesn’t die out. The researchers say their new findings about non-heterosexual behavior, though not conclusive, are consistent with such a Darwinian balancing act.