Gay sex – some humans do it, some penguins do it, and as it turns out, many monkeys do it. It's only natural, according to a study published Monday in the journal Nature Ecology and Evolution.

By watching a group of rhesus macaques over a three-year period in Puerto Rico, scientists from the Imperial College of London found it was more common for the males to engage in sex with the same gender than with the opposite.

The researchers reported 72% of the 236 male monkeys either mounted, or were mounted, by other males, whereas only 46% participated in heterosexual sex.

There have been many different theories – including not enough females, establishing dominance, or blowing off steam – that may explain why animals might engage in homosexual behavior.

But the researchers believe their observations actually support a whole new theory – that the males who have sex together have an evolutionary advantage over their heterosexual counterparts.

Male bisexual monkeys have an evolutionary edge

The male monkeys who had sex with each other often backed up their partner in fights, the researchers reported. Moreover, these male monkeys weren't strictly homosexual. They did have sex with females, too.

In fact, the researchers found that the bisexual macaques had more offspring than their heterosexual counterparts.

So taken all together, "they form bonds, and they help each other in a fight," Vincent Savolainen, biologist and lead author of the study, told New Scientist. "And then the idea is that if they do this, then they might also have access to more females and, in effect, have more babies," he said.

And those babies might be more likely to do the same, the researchers found.

Gay sex in male monkeys is partially heritable

By using genetic tests and family trees, they found that same sex behavior was 6.4% heritable.

On its own, that might seem low. But it's in line with the other heritable behaviors that the scientists have identified in monkeys – including grooming and sociality, a press release from the university detailed.

In general, behaviors are difficult to attribute to genes at all, so even a seemingly low percentage of 6.4% is noteworthy.

Though the relationships the monkeys have are probably different from those of humans, Savolainen hopes that these findings could help us better understand the variability of sex.

"Unfortunately there is still a belief amongst some people that same-sex behavior is 'unnatural,' and some countries sadly still enforce the death penalty for homosexuality. Our research shows that same-sex behavior is in fact widespread amongst non-human animals," Savolainen said in a statement.

This article was originally published by Business Insider.

More from Business Insider: