Men with a brother found guilty of a sex offence are up to five times more likely than average to commit a similar crime, a study suggests.
Genetic factors had a "substantial influence" on the risk of being convicted of a sex offence, it found.
The study analysed data from 21,566 men convicted of sex offences in Sweden between 1973 and 2009.
The findings could help prevent crime, said co-author Prof Seena Fazel from the University of Oxford.
The study - by researchers from Oxford University and the Karolinska Institute, in Sweden - looked at the proportion of sexual offences carried out by sons and brothers of convicted male sex offenders.
The authors then compared the data with the criminal records of men from the general Swedish population with similar age and family profiles.
It found around 2.5% of brothers of convicted sex offenders were themselves convicted of sexual offences - compared with 0.5% of men in the general population.
The study also looked at the sons of sexual offenders, and found they were nearly four times more likely than average to have committed a similar crime.
Other studies in the past have assessed the link between familial relationships and the propensity to commit crime.
One found that children of male violent offenders were about 3.5 times more likely than average to commit violent crimes themselves.
In the latest study, genetic factors were found to have a "substantial influence on an increased risk of being convicted of sexual offences", Prof Fazel said.
"It tells us something about why if we take two sets of brothers, whose backgrounds might look identical, one set has a higher risk of sexual offending than the other," he said.
The analysis could help authorities target potential offenders, Prof Fazel said, adding: "At the moment genetic factors are typically ignored when it comes to making risk assessments of those at high risk of sexual offending."
He told BBC Radio 4's Today programme that while a person's environment was a contributing factor to their risk of sexual offending, a person's genes could contribute about 30-50% of the risk.
But the authors stressed the analysis did not mean someone with a brother or father convicted of rape would also go on to become a sex offender.
"It's important to remember that it's nothing mystic," said Professor Niklas Langstrom, from the Karolinska Institute.
"People get worried about the fact that there's a strong genetic component in problematic human behaviour.
"Of course, you don't inherit in some kind of automatised robotic way so that you will grow up to be a sexual offender."