Scientists say they have taken a step forward in understanding why some people are at greater risk of skin cancer because of their family history.
A newly identified gene mutation causes some cases of melanoma, a type of skin cancer, says a UK team.
The discovery will pave the way for new screening methods, they report in Nature Genetics.
The risk of melanoma depends on several factors, including sun exposure, skin type and family history.
Every year in the UK, almost 12,000 people are diagnosed with melanoma.
About one in 20 people with melanoma have a well-established family history of the disease.
A team led by the Wellcome Trust Sanger Institute in Hinxton, UK, found that people with mutations in a certain gene were at extremely high risk of melanoma.
The mutations switch off a gene known as POT1, which protects against damage to packets of DNA, known as chromosomes.
Co-author Dr David Adams, from the Wellcome Trust Sanger Institute, said the discovery should lead to the ability to find out who in a family was at risk, and who should be screened for skin cancer.
He told the BBC: "The mutations in this gene result in damage to the end of the chromosomes and chromosomal damage in general is linked to cancer formation - that's the pathway for it."
A number of gene mutations have been identified as increasing the risk of melanoma, but others remain unknown.
Prof Tim Bishop, Director of the Leeds Institute of Cancer and Pathology, said the finding increased understanding of why some families had a high incidence of melanoma.
"Since this gene has previously been identified as a target for the development of new drugs, in the future it may be possible that early detection will facilitate better management of this disease," he said.
The team found cancers such as leukaemia were common in these families, suggesting the gene may underlie other cancers and not just melanoma.
Dr Safia Danovi of Cancer Research UK said: "This is a step forward for people with a strong family history of melanoma, the most dangerous form of skin cancer.
"But it's important to remember that, for most of us, avoiding sunburn and sunbeds is the best way to reduce the risk of this disease."