Men with advanced prostate cancer could be checked for high-risk family genes because they are fairly common, affect treatment and can be passed on to their children, say experts.
According to the international researchers, more than one in every 10 men with the advanced disease carries a faulty gene, inherited from a parent.
One of the genes is BRCA1 - already linked to breast and ovarian cancer.
The study, in the journal NEJM, is the largest of its kind to date.
It included nearly 700 patients with aggressive prostate cancer and found that a "significant proportion" of these men are born with mutant DNA.
Men with these genes may benefit from newer drug treatments that exploit the damaged genetic code to locate and kill off cancer cells.
Inherited risk
One in eight men will get prostate cancer in their lifetime - that is 47,000 men diagnosed with the disease every year in the UK.
Some prostate tumours are very slow growing and may never cause any symptoms or harm. Others - about a third - are faster growing and can be lethal.
Researchers have been looking for ways to better recognise which cancers will be more problematic and they believe looking at a person's genes could help.
Prof Johann de Bono, from London's Institute of Cancer Research, and colleagues used a saliva test to check the DNA of the 692 men with advanced prostate cancer who took part in their study.
About 12% of the men were found to have inherited DNA mutations that the experts say could be the root cause of their cancer.
Prof de Bono believes identifying patients in this way could improve treatment.
"We could offer these men drugs such as PARP inhibitors, which are effective in patients with certain DNA repair mutations and are showing important anti-tumour activity in ongoing clinical trials."
He said it was too early to recommend screening whole families for the mutations, but that might be sensible in the future.
"As doctors, we all know patients who say their father and grandfather had this cancer.
"We need to do trials to evaluate this risk. Then we could look at preventive strategies."
He said if the risk was high then maybe the men at greatest risk could consider having their prostate removed as a precaution.
He pointed out that doctors already do similar preventive surgery for breast and ovarian cancer linked to the BRCA genes.
But he cautioned that it was still early days - more studies are needed to assess this.
Dr Iain Frame of Prostate Cancer UK agreed, saying: "In future testing all men with advanced disease for these mutations might help select the most effective treatments for them.
"However, there's still a lot of work to do to see how this could be done in a routine clinical setting, and to consider the consequences for men and their families."
Dr Imran Ahmad from Cancer Research UK said: "As the cost falls, the cancer sequencing approach used in this study will become more and more relevant, making it possible to routinely examine all men with advanced prostate cancer for inherited mutations."