Genetic factors account for between 30% and 40% of what decides whether a man is gay or straight, according to the largest investigation conducted into the subject.
A group of US researchers stressed environmental forces, such as hormones in the womb, played a more important role.
But this did not imply upbringing or other social factors, or individual choice, had a bearing on sexual orientation.
"Sexual orientation has nothing to do with choice," said Dr Michael Bailey, from Northwestern University in Chicago, who co-led the study.
"Our findings suggest there may be genes at play - we found evidence for two sets that affect whether a man is gay or straight.
"But it is not completely determinative; there are certainly other environmental factors involved."
The research involved testing the DNA in blood samples taken from more than 409 gay brothers and their heterosexual relatives.