Researchers at the University of Portsmouth believe they may have discovered the evolutionary reason for same-sex behaviour.

A study of predominantly heterosexual men and women found that people with higher levels of the hormone progesterone are more likely to have homoerotic thoughts, which helps humans bond with others.

The Telegraph reports Dr Diana Fleischman, the report’s author, said: “In the paper we talk about why homosexuality persists, and we do explain why.

“From an evolutionary perspective we tend to think of sexual behaviour as a means to an end for reproduction.

“However, because sexual behaviour is intimate and pleasurable, it is also used in many species, including non-human primates, to help form and maintain social bonds. We can all see this in romantic couples who bond by engaging in sexual behaviour even when reproduction is not possible.

“Having some degree of attraction to the opposite sex is a type of adaptive behaviour, and in any adaptive behaviour you will see extremes of the spectrum, hence some people will only be attracted to members of the same sex.

“But the research suggests that having exclusively heterosexual thoughts is a disadvantage – it’s better to be a little bit attracted to the opposite sex.”

Dr Fleischman said her research did not point to any correlation between environmental levels of progesterone and sexual orientation. She said that while a synthetic form of progesterone is used in the contraceptive pill, which then enters drinking water supplies, “we didn’t find any difference between women on the pill and women not on the pill”.

She added that while environmental levels of progesterone have increased, there is no evidence that the percentage of people who are gay or lesbian has gone up.