Genes linked to homosexuality have been discovered by scientists in the biggest ever study into the genetic basis for sexual orientation.

For the first time, researchers looked at the complete genome - a person’s entire DNA code - for more than 1,000 gay men and compared it to genetic data from a similar number of heterosexual males.

They discovered that DNA was different for gay and straight men around the genes SLITRK5 and SLITRK6.

SLITRK6 is an important gene for brain development, and is particularly active in a region of the brain which includes the hypothalamus.

The hypothalamus is crucial for producing the hormones which control sex drive, and previous studies have shown parts of it are up to 34 per cent larger in gay men.

The researchers, from North Shore University Health System’s Research Institute, in Illinois, US, also discovered differences in the TSHR gene, which is linked to the thyroid, another area which has previously been associated with sexual orientation.

“Because sexuality is an essential part of human life – for individuals and society – it is important to understand the development and expression of human sexual orientation,” said lead author Dr Alan Sanders.

“The goal of this study was to search for genetic underpinnings of male sexual orientation, and thus ultimately increase our knowledge of biological mechanisms underlying sexual orientation.